Missing history in allure report - allure

i use python 3.8
selenium
i run pipeline in gitlab
first run
stages:
test. (run automation test)
history_copy
generate_report (generate report)
report (put the report on the pages in gitlab)
second run
stages:
test. (run automation test)
history_copy ->
unzip artifacts.zip
- chmod -R 777 public
- cp ./public/history/* ./allure_results
generate_report (generate report)
report (put the report on the pages in gitlab)
in the pages i see the allure report correctly but i dont see the history

Related

Starting SFDX: Deploy Source to Org - Slow, Really Slow, In fact it never finished

I was doing a deploy to Salesforce (my first) via; Right-click; "Deploy to Org" on a single file. There's no useful output to say what's going on.
14:35:11.774 Starting SFDX: Deploy Source to Org
I've read elsewhere that Salesforce can be exceptionally slow when it comes to deployment, but ten minutes (and counting) to deploy a single file seems very slow indeed. Is there a way to debug into what's happening, or is it just a black box?
Production or Sandbox? "Normal" or "source tracked" (like scratch org for example). Do you have "Output" view / tab / thing at the bottom of your VSCode where you should normally see command results (slightly different from "Terminal").
If you login to the target org and setup -> monitor deployments do you even see your attempt? If you deploy to prod by default it'll run all tests which in complex orgs may be expensive, take 1h for example.
You may get results faster if you run just 1 test related to the class you're deploying - but for that you need to whip out some script-fu.
sfdx force:source:deploy -u mytargetuser -p "force-app/main/default/classes/AccountTriggerHandler.cls" -l RunSpecifiedTests -r "AccountTriggerHandlerTest" --verbose --loglevel fatal -c

How to serve Allure Report without automatically starting the browser

When i start the allure, the server always attempts to start the browser:
$ /home/allure/allure-2.3.4/bin/allure serve target/allure-results -p 5012
Generating report to temp directory...
Report successfully generated to /tmp/779851636804605067/allure-report
Starting web server...
2017-08-21 17:51:00.271:INFO::main: Logging initialized #3082ms
Xlib: extension "RANDR" missing on display ":99".
Exception in thread "main" java.lang.UnsupportedOperationException: The BROWSE action is not supported on the current platform!
at java.awt.Desktop.checkActionSupport(Desktop.java:225)
at java.awt.Desktop.browse(Desktop.java:381)
at io.qameta.allure.Commands.openBrowser(Commands.java:207)
at io.qameta.allure.Commands.open(Commands.java:135)
at io.qameta.allure.Commands.serve(Commands.java:119)
at io.qameta.allure.CommandLine.run(CommandLine.java:136)
at java.util.Optional.orElseGet(Optional.java:267)
at io.qameta.allure.CommandLine.main(CommandLine.java:72)
2017-08-21 17:51:06.387:WARN:oejsh.ResourceHandler:qtp1928301845-20: org.eclipse.jetty.io.EofException
2017-08-21 17:51:06.388:WARN:oejsh.ResourceHandler:qtp1928301845-15: org.eclipse.jetty.io.EofException
The problem is not in the error, but in the launch, I don't need to start it on this host.
How do I start the allure server without starting the browser?
You can use the docker container Allure Docker Service, recognize the results automatically and update the reports without doing anything:
https://github.com/fescobar/allure-docker-service

Error in Selenium tests triggered from batch script in TFS Build step

Step 1. I have written selenium tests and bundled it into executable jar.
Step 2. When I execute this jar tests runs normally. Invokes New browser and execute all steps.
Step 3. I created bat file to execute this jar. In this case also test execution happens normally.
Step 4. TFS Build integration. (TFS 2015)
- I created new build definition in TFS
- Added build step "Batch Script"
- Entered path of bat file created in step 3 in build step
- When I Queue this build. bat file gets called and test execution starts. But It does not open new browser..console says Started IE driver...it starts driver internal to build agent. and execution fails on setting value in textbox.
Click to see TFS Build Cosole
I can't use Visual studio tests. Requirement is to selenium tests should be triggered from jar created on Step 1.
Make sure the build agent is running in interactive mode.
First you could try to RDP to the remote build server(the build agent located) and manually run the batch file to see if it works.
If it's also not work then the issue may related the IE browser on the server.
If it works then maybe the TFS build service account don't have enough permission to run the IE driver. Please make sure the build service account has local Admin permission on the build server.

go code coverage report in Jenkins with cobertura plugin

I have installed cobertura plugin in Jenkins and ran unit tests with below command #go test -cover -p 1 $PKGS | go-junit-report > report.xml. I could see report.xml is created with code coverage but I see below error in Jenkins console. Could you please let us know what is the issue and how to resolve this.
/bin/sh -xe /tmp/hudson1811800402022775798.sh
[Cobertura] Publishing Cobertura coverage report...
FATAL: Unable to find coverage results
java.io.IOException: <workspace>/report.xml is not a cobertura coverage report, please check your report pattern
at hudson.plugins.cobertura.CoberturaPublisher$ParseReportCallable.invoke(CoberturaPublisher.java:566)
at hudson.plugins.cobertura.CoberturaPublisher$ParseReportCallable.invoke(CoberturaPublisher.java:536)
at hudson.FilePath.act(FilePath.java:1018)
at hudson.FilePath.act(FilePath.java:996)
at hudson.plugins.cobertura.CoberturaPublisher.perform(CoberturaPublisher.java:343)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
at hudson.model.Build$BuildExecution.post2(Build.java:185)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665)
at hudson.model.Run.execute(Run.java:1766)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
[Cobertura] No coverage results were found using the pattern '**/report.xml' relative to '<some directory>'. Did you enter a pattern relative to the correct directory? Did you generate the XML report(s) for Cobertura?
Build step 'Publish Cobertura Coverage Report' changed build result to FAILURE
Finished: FAILURE
I have followed below steps to generate coverage report (for go language)
gocovxml
Install gocov xml using below commands
$ go get github.com/axw/gocov/...
$ go get github.com/AlekSi/gocov-xml
execute go test command if you have multiple packages
gocov test $PKGS -p 1 | gocov-xml > report.xml
Provide report.xml in publish cobertura coverage report (Post build action in Jenkins)
**/report.xml

display my own tab using command line tool

Before creating a new tab report, i have tried to display the example (with attachement tab) provided on allure-report-plugins repository .
I have downloaded and upgraded the last command-line tool
I have copied the generated attachments-plugin-1.0-SNAPSHOT.jar in the same directory than the allure-cli.jar
I have executed the following command :
java -cp .;attachments-plugin-1.0-SNAPSHOT.jar allure-cli.jar generate path/to/xml
I get the a report but i don't find the new tab with attachements.
How to take into account the plugin.jar with command line tool ? Same question, if i want to use the jenkins plugin to generate report in a CI environnement.
thanks
As I understand CLI Tool is being migrated to Allure core (it already supports plugins). So, you can:
use your own patched version (please have a look at ReportGenerate.java in Allure Core repository)
wait for new version (will create pull request ~next week)
Allure plugins support in Jenkins is in progress.
(Already supported in Allure maven plugin.)

Resources