Which is the best and featured way to generate reports either by using Maven or ANT? What are the features and differences ? I am using selenium webDriver with TestNG. By using testNG should I prefer "build.xml" or "pom.xml" ?
Maven and ant are build tools. What generates the reports is Testng. So if you use ant or maven, the report generated will still be the same. You can probably do a comparison between maven and ant as build tools, not as a report generation framework, to pick up the one you find better. If you might find this any help.. A blog written long back to describe the ecosystem..http://niharikawhatsnext.wordpress.com/2012/02/15/test-automation-to-building-to-execution-to-scheduling-java/
You can use both maven and ANT to produce XSLT reports which uses TestNg generated output.html. Both are mainly used for build purpose not for report generation.
The XSLT reports generated from maven and ANT both looks same. But there are many advantages in Maven over ANT in testing frame works (I am assuming you know what are those). So I would personally prefer Maven. Please go through the below links which you might found helpful.
http://www.javatpoint.com/difference-between-ant-and-maven
http://blog.varunin.com/2012/05/generate-testng-xslt-report-using-maven.html
Related
I'm working on Cucumber automation using selenium webdriver. I'm fairly new and have not used Maven just yet. I have not been able to generate an html report. Currently, my target remains blank.
Is it because I'm not using Maven or is it possible to create/generate without it
If YES, then how?
If NO, then whats the reason?
You can use cucumber without maven, you just need to add cucumber .jar file manually. (here you have exemple)
However I recommend you to use maven or ant or gradle. It does the same thing but automatically.
So i am trying to create a protractor test with cucumber and use Maven as build tool and project management tool .Is it a feasible combination using Maven with cucumber and protractor. If yes ,please advice how.
Yes, you can use maven as a build tool for cucumber project, here is the link i am providing which is the best official link of cucumber in which they have mentioned every thing in a clean way.
https://docs.cucumber.io/guides/10-minute-tutorial/
you can refer this link it will clear all your confusion and you'll have clear vision of using maven in your project.
I am trying to setup the maven project to run the JMeter tests. Please let me know the way to setup the things to run the JMeter tests using Maven.
For me, most natural option is to use jmeter-maven-plugin:
https://github.com/jmeter-maven-plugin/jmeter-maven-plugin
It has good wiki with plenty of configuration examples.
I documented it all here. This project describes how to do it with Gradle and also with Maven. Personally, I think the Gradle version is a little more stable but the Maven version allows for nice HTML reports.
I created selenium test cases using TestNG. After that I created testng.xml and ran all classes parallely. Now the problem is to generate Selenium HTML Report in Jenkins. I exactly have to do that is mentioned in this link.
For that how to generate Selenium Html Report. I used Maven as build tool.
Selenium (RC) by itself doesn't generate any reports (as far as I know). It relies on the testing framework that it gets coupled with. Since you are using TestNG as your testing framework, TestNG does generate the html reports. You can go to your test-output folder and check for index.html which would be a link to the results. In case you are invoking through maven, check the target\surefire-reports folder for reports.
For integration with Jenkins, you can use the testng plugin (https://wiki.jenkins-ci.org/display/JENKINS/testng-plugin) which would give you the testng results on your job page.
You can also try if the html report generated by TestNG can be parsed by the plugin you mentioned, in case you want to use that plugin only.
Hope it helps.
You can also use Allure Report with pretty view and easy-to-use with maven
Try this http://www.wakaleo.com/thucydides/
This library generates well reports, but needs some changes in code.
I am using SONAR for Code Quality checks of my projects. In one project I would like to know the code coverage of a library which is included in the classpath (maven dependency).
Is it possible to configure SONAR (with embedded COBERTURA) to also instrument the specific library for code coverage analysis? As cobertura instruments the bytecode this should be possible but I do not know if it is supported by cobertura (even indepentend from SONAR).
Any hints are welcome.
Regards
Klaus
You would have to set up cobertura(maven target) yourself and import the results(See dynamic analysis)
sonar.dynamicAnalysis=reuseReports
sonar.cobertura.reportPath=PATH_TO_RESULT
But I will not help much:
you would need the src files of the jar to see the coverage, otherwise you would just get % numbers and I'm not even sure sonar will show the extra covered files
the coverage for your whole project will always include the % of the library, so it will go down
It is better to test each project with its own unit tests on its own.