Testing Java Applications with Visual Studio Team Services

If you watched the Connect() event I am sure you noticed that we are focusing on enabling cross platform development with Visual Studio Team Services.

This definitely includes testing those applications.   The new Visual Studio Team Services includes build tasks to make it easy to integrate your build and testing efforts into your release pipelines with rich reporting highlighting build-on-build changes, easy to create actionable bugs for regressions and the ability to create and display code coverage with a simple checkbox. 

Note: If you prefer videos you can also see the same information on Channel9: https://channel9.msdn.com/Series/Test-Tools-in-Visual-Studio/Testing-Java-Applications-with-Visual-Studio-Team-Services

Build Integration

The new Visual Studio Team Services build tasks makes it easy to build to build Java applications. These same tasks also make it easy to test your Java applications.  In the example below we are using Maven to build the Java application then using both Maven and Perfecto Mobile to test the Java application…

image

The output of these tests and other testing frameworks is made available to the standard Test Reports through the “Publish Test Results” task.

Note in the image below the task defaults to importing the test results from Junit.

image

Build-on-build Summary Results

Visual Studio Team Services automatically adds build-on-build changes in the summary view to give a clear indication if your quality is improving.

In the example below you can see 16 new tests were added(Yeah!) but 6 of those tests are now failing and the build time is now MUCH longer. 

image

Test Details View

Where the summary view gives build-on-build changes the Test Details view lets us identify the problem –and easily action them.

In this view we display all the failed test information and by selecting the failed test display all the data you need action this issue such as: the error message, duration, failing agent and stack trace.

image

Easily Create Actionable Bugs

After an issue has been identified the Test Details view makes it trivial to create actionable bugs that include all the the data from from the details view(error message, duration, failing agent and stack trace) plus automatically linking the build, test run and automatically generates a title…reducing the bug creation process to near zero!

image

 

Code Coverage Results

By checking an option in the test build task Code Coverage is automatically collected during the testing.   Just like the Test information the summary view shows the rollup data and the there is a detailed Coverage Results report that enables you to drill into your application and identify coverage in different areas of the application.

image

image

image

 

Summary

As you can see not only is Visual Studio Team Services is a great place for tracking and building your Java applications we are making it the place to test them too!

Please check out our new Java site for more information http://java.visualstudio.com/

 

If you are testing Java Applications and currently using JMeter be sure and check out our JMeter preview: http://blogs.msdn.com/b/visualstudioalm/archive/2015/11/19/private-preview-running-apache-jmeter-load-tests-in-the-cloud.aspx