coverage java tool - java

I'm wrintting java tests to control the GUI application, and I'm searching a tool to cover the java test , what is your recommandation ?
which tool is usually used to cover java tests ?

I recommend Cobertura for measuring test coverage. You can plug it into ant, maven, hudson, eclipse etc.

I recommend Sonar, see the hyperlink for how it shows code coverage (apart from doing many other handy things).

You can try to use Cobertura, it creates nice reports, and is easy to use in conjunction with junit, using ant or maven.
A great tool for reporting is Sonar, which integrates coverage tests, but also tools like checkstyle, findbugs, and provides a nice interface to analyse the outputs. It is also very easy to setup, definitively worth trying.

I strongly recommend taking a look at Code Pro tools. It's for Eclipse. And it contains a lot more than code coverage, it is code analyzer, junit test generator, dependency analyzer and so on...

Related

How to generate reports in selenium webdriver (java)?

I have written my automation scripts for a registration scenario using selenium webdriver and java in Eclipse IDE creating maven project.
I have written my entire script (End to end application flow) under java main .Now business people are planning to integrate with Jenkins.Can you please help me how to generate reports to see my output results in eclipse and jenkins?
Note :I have not used any cucumber annotations,features files,step definitions,test runner classes.I right click my project in Eclipse IDE and run as java application and see the results in console.
There are several known and widely used tools for creating test reports.
I prefer using extent report report.
It can be easily integrated with major testing frameworks like JUnit, NUnit, TestNG, etc.
You can simply find a lot of perfect tutorials how to use it. Like this and many others.
Since Selenium does not have itself a reporting functionality we have to import Reporting libraries such as extent reports. It can be easily integrated with major testing frameworks like JUnit, NUnit, TestNG, have .html reports and the level of customisation it offers is commendable. You can read this article. here
Also you can use TestNG reports here
But its more advantageable if you use extent reports

Jacoco support for apache wicket?

I'm deal with Hybris project with Apache Wicket. Does Jacoco support Apache Wicket tests?(specific tests for UI rendering) I didn't find anything about this. Or maybe the are some plugins for this? What test coverage tool choose for Apache Wicket?
Jacoco does code coverage, so every line of java that is touched by the tests from WicketTester is covered.
We use it a lot. It does not do anything with the generated HTML itself.

Tried and tested ways to automate load tests with Maven

I'm trying to figure out the best way to automate the execution of and result recording of load tests. We currently use Maven; ideally the solution would be executed as part of the Maven project life-cycle, so that people do not need so spend time on effort setting up the tests.
It should save the output of the tests (e.g. as some files that could be committed into version control), and should have the sense to not compare tests run on a dusty x486 with a 8 core Sparc.
JMeter is another Apache project which is very well adapted for automation (you can control most things from the command line); there are also several plugins that you can use to integrate it into Maven. Personally, I think this is by far the best tool for this sort of requirement.
You still need to create the actual tests to run and decide which environment to use - but this will always be the case no matter which tool you choose.
Have a look here, here and here.

What is the standard for testing in Java?

What apps would you use? Are there auto testing suites like autotest for ruby? What do you use and why? To be honest, I don't even know how to write tests, when, or why. I'd like to learn though, I know that it will make me a better developer.
Our team uses Netbeans, not eclipse, although I'm going to still google eclipse responses to see if they are implemented as a Netbeans solution as well.
There are 2 most popular frameworks for unit tests: JUnit and TestNG. Both are annotation based. To create test you have to create class and mark each method that performs test using annotation #Test.
JUnit is older and have more extensions (DBUnit, Cactus etc). TestNG has much more annotations. Very important feature of TestNG is ability to create test groups using annotations.
Yet another group of tools you will probably need is mocking tools (EasyMock, EasyMock etc.)
There are a bunch of testing frameworks that are popular. JUnit is pretty good and comes by default with Eclipse. It provides an API for defining tests and doing assertions, as well as a Testrunner to execute the tests. EasyMock and Mockito work well with JUnit to provide mocking functionality so you can test components in isolation.
For continuous integration, there is Jenkins, which is free.
There are others as well.
I would use junit and possibly a mocking library like jmock.
Most of the automatic "tests" which can be done use the compiler or a code analysis tool like FindBugs.
In addition to what has already been said (JUnit, EasyMock, ...) you may also have a look at Fitnesse: it may be a good tool for full integration and acceptance tests!
Don't forget TestNG. It's the "next generation" beyond JUnit. It handles threaded tests better.
SOAP UI is the right tool for testing SOAP web services.
JMeter or Grinder for load testing.
As JUnit and Mockito was already mentioned, You can look into Infinitest or JUnit Max for autotesting.
http://infinitest.github.com/
http://junitmax.com/
If you are looking for something that implements continuous testing I can recommend two free products:
For a developer during work in Eclipse/IntelliJ IDE:
http://infinitest.github.com/
Infinitest is an Eclipse/IntelliJ plugin that runs your test continuously in the background while you are developing your code.
For a team:
http://hudson-ci.org/
or
http://jenkins-ci.org/
are great continuous integration servers that can do builds and run tests continuously.
Been writing junits for over 7 years now and I highly recommend spock for all your testing needs: unit and integration testing, mocking, end-to-end testing, data driven testing etc

Continuous build framework for java+python+ruby?

Our technology set includes java, python, and ruby code (no, we're not google ;-) ).
Recommendations on good CI framework to use? Hudson? Other?
dwh
I would recommend Hudson. It's written in Java so it runs on most platforms, has a very pleasant web-interface and excellent usability, and plugins for Python and Ruby as well as supporting shell scripts out of the box. It integrates well with SCM - for example, it can be triggered by checking in changes to a repository. It has lots of useful plugins.
I've had good luck with CruiseControl. It's based on ANT, so it's easy to write your build xml files for any language that you want... It also has builder support for Rake and a bunch of others (NANT, Maven, Phing and XCode, not to mention anything that can be run from the command line), so you should be good to go.

Categories

Resources