Allure reporting issue with testng and maven, java selenium - java

I have updated my pom.xml as per link.
But only xml files are getting created under folder 'allure-results'.
No index.html file is created for the executed test cases.
I was also searching for testng listeners for allure reporting. But unable to find the same.
Can anyone help on this.

You need to use one of the report generation tools to generate the report from xml results. In your case allure-maven-plugin is already configured in pom.xml. So simply run mvn site to generate the report. For more information see the docs.

Related

How to add #AllureId annotation to tests in source code using cli?

Our application is spring boot based project written with kotlin. There is great plugin for JetBrains IntelliJ IDEA for Allure support. The plugin provide a possibility to generate test reports, upload them to Allure TestOps and link tests from source code to test launch (tree of all tests) in Allure TestOps. Linking is achieved through adding #AllureId annotation to tests in source code.
My goal is automate this process inside build pipelines. Allure has allurectl tool which allows to upload test reports to Allure TestOps. But as far as I concerned it doesn't have a feature to assign #AllureId annotations.
Is there any option to assign #AllureId to tests from source code using command line?
You are generally right - allurectl does not have this feature. It is supported in the Allure IDEA plugin only.
The reason is that automated test-case linking feature in the plugin is implemented via the IntelliJ engine, so we'd have to write our own engine for the allurectl to make it work.
I've find out that adding a label's node with name "as_id" to generated json report works as a way to set allureId. Tested with upload to Allure TestOps, it works.
Some details are here and in related PR:https://github.com/Tinkoff/Allure.XUnit/issues/25

jacoco code coverage report includes maven dependencies in addition to the application code

I have a jacoco agent that is attached to a webservice. I executed my automation test cases and extracted the jacoco-client.exec from the webservice using the ExecutionDataClient. Now I am trying to generate a jacoco report for the webservice using the jacoco-client.exec file.
I am using the below command to generate the report.
java -jar jacococli.jar report jacoco-client.exec --classfiles rest-service2-0.0.1-SNAPSHOT.jar --html report
The webservice code repo is present as a separate repo and it is not a part of the automation code repo. So I cannot provide the classfiles path directly in the above command. So instead i am providing the application jar.
The issue is, jacoco is generating the code coverage report for all the maven dependencies in the jar along with the original code. But I need the code coverage for the application code alone and not the dependencies code. I am entirely new to using jacoco and don't know how to proceed further. Can someone please help me with this please.

Pushlish TestNG results in TFS

We have created a Maven project and automated test scripts using Selenium, Java and TestNG framework.
The code is checked in tfs using TEE plugin and we are able to create maven build in tfs. Now we need to publish the results of the test scripts in TFS.
Please advise how could we publish the results in TFS and generate reports.
Generate a custom report from TestNG is pretty easy: just implements your own IReporter. See the related documentation: http://testng.org/doc/documentation-main.html#logging
Now, you have to find what is the best way for sending test reports to TFS.
It could be by generating a specific file or by using an API like https://www.visualstudio.com/en-us/docs/integrate/api/test/results#add-test-results-to-a-test-run

How to install and setup Cucumber jar files in Eclipse for WebDriver Testing

I am fairly new to Java, eclipse, Cucumber and Selenium. I am just beginning to learn these. Overall, I am fairly new to StackoverFlow.
I got problem that I am unable to ADD any dependencies in my POM.XML in eclipse. I have saved Cucumber jvm-java, cucumber jvm-junit in my library folder
I explained clearly step by step below...
installed cucumber jvm-junit jar file 1.1.2 and paste it in my library
installed cucumber jvm-java jar file 1.1.2 and paste it in my library
Sikuli, selenium 2.35.0, chrome driver, IE driver also been there in library.
I created one Maven project
Added feature file for the created Maven project.
POM.XML is visible in my eclipse
I got problem here, When I Double clicked POM and clicked Dependencies tab to add dependencies for cucumber jar files.
And I entered Cucumber or selenium in my search field tab, then I dont see any results return. IT'S EMPTY.
I don't know how to add these dependencies in to POM.XML. I am trying to figure out these on the internet. I didnt get what exactly I am looking. Basically, the dependencies results are not returned so I can't add to the POM and I can't continue test with Cucumber framework.
Can anyone please sort this out with clear understanding each steps, as I am fairly new to all these.
read this link might be good for you
http://xebee.xebia.in/index.php/2014/06/04/behavior-driven-development-using-cucumber-jvm-a-java-approach/

How to get Hudson to show complete selenium report?

Our Hudson installation shows a very spartan version of the Selenium report:
Selenium Report Result
numTestPasses 2
numTestFailures 0
I've understood that it should be possible to view full reports via Hudson, and also track development of the tests. But how?
We configured Hudson to run Selenium through an Ant task. Then we added a post-build action to "Publish JUnit test result report." With this setup we can see each failed test name along with how long each test took and the ability to drill down into all the tests to see specifics.
You may be able to just add that post build action to your project using the Selenium plugin.
Not sure if this fits in your environment: I'm running selenium-rc via JUnit (and phpunit) test cases using ant in a Hudson freestyle Project.
Hudson collects and publishes JUnit and via xUnit Plugin various other test results in an optional post build step.
Maybe you just need to find out where the build process stores the actual xml report and instruct hudson to publish it?
I run Selenium tests in Hudson using this plugin. It runs my Selenium tests and publishes detailed test reports. Very easy to configure, maybe not perfect if you have a lot of test suites to execute.
We use the SeleniumHQ plugin. The results are saved in the workspace (this is done in the project config by using "Publish Selenium Report"). You can save the build reports by using "Archive the artifacts" in project config.
We have written the Selenium tests as normal JUnit tests, which gets executed with the rest of the tests, so the reports are embeded i the junit test report generated by hudson.

Categories