Sunday, October 16, 2016

Sample REST-assured Project for REST API testing

We decided to experiment  building a simple REST API testing framework in a Java Maven project using REST-assured and testNG. There are several blogs that explain how to use it but we could not find a sample framework to use as a base. Therefore, we decided to build one from scratch and make it available for others to use. The project can be found in github at this location: https://github.com/mtristain/restapitestsample

Building a REST-assured test framework from scratch was surprisingly easy to do. Especially if you are using Maven or Gradle. The instructions on how to install and run the tests are also in the same location above. In order to add tests to our sample REST API testing framework, we needed some publicly available Restful APIs. The REST APIs for testing and prototyping at JSON Placeholder did the trick. The base class is very simple as you can see below. It obviously needs more work if you are planning on using it for more sophisticated APIs.


There are a total of 20 tests at the time of this post. The tests are simply validating response codes, certain content, or the size of the response object.

Sample #1: Validate status code




 Sample #2: Validate response size:


 Sample #3: Validate that 100th item contains certain content.



After automating these tests we decided to schedule a run in Jenkins and load the results to TestRecon. We used a PowerShell script to call the Recon APIs and load the results after the tests completed. The results can be seen below. You can also generate these reports and slice and dice your test results using TestRecon.








Stay tuned to find out the steps and instructions on how to use PowerShell to make http calls and load test results to TestRecon or other tools.


Set up your free account at testrecon.com

Monday, September 19, 2016

Test Results. Made Simple

- Are you struggling to keep up with the development pace?

- Are you constantly dealing with reoccurring bugs?

- Are your 'go or not go' decisions mostly made on gut feel  without much feedback from testing? 


TestRecon resolves all these problems by using the data that you already have to produce the information that you need to make critical decisions.


Set up your free account at testrecon.com







Sunday, June 19, 2016

7 reasons why you will love TestRecon

 1) It is Easy! - TestRecon is easy to configure and does not require any changes to your existing automated test framework. You can create a test suite and upload JUnit xml  and .NET trx files in an instant.

2) It is Convenient - Use the agent or the APIs to load your test results as soon as your tests complete. No need to find test results in file systems, emails or log files.

3) Saves Time! - TestRecon allows you to add notes or link bugs to known test failures so you don't have to keep looking at the same thing every day. It also allows you to see all test results in one place and identify trend by letting you compare results side by side.

4) Mobility - TestRecon is mobile friendly. You can see test results on the go on your phone or tablet.

5)  Keeps everyone on the same page - Get notified when someone creates a new suite,  makes changes, or add notes to keep your teammates informed of known issues.

6) Real Time Results - Everyone can create their own personalized dashboard and see test results in real time, as well as bugs and recent activity

7) Your Boss will love it too! - TestRecon improves the team efficiency, saving money! You no longer need an army of people looking at the same test results every day. Your team will spend less time looking at test results and more time in revenue producing tasks that are also more exciting!


Saturday, May 14, 2016

Automate testing as part of the continuous delivery/integration cycles






As testing becomes increasilingly embedded into the development and DevOp activities, it is extremely important to make test automation part to the continuous integration or delivery process. By doing this, testers can ensure that their tests are always targeting the latest version of the software and defects are caught as early as possible. This is easily achievable by using a tool like Jenkins to trigger the automated REST or UI tests every time developers commit code and the application under tests is deployed in the CI or Staging environment.  However, one of the challenges of following this process is the time that it takes to analyze test failures and keep track of known issues. Looking at the test reports generated by the framework (JUnit, TestNG, Cucumber, etc.) might be ok at first, but as the number of tests and the number of daily commits grows, this process may become overwhelming. TestRecon solves this problem by allowing the testing and development team view all test results in a central location and quickly identify trends like tests failing with the same error code or flaky tests. In addition, it allows users to link test failures to bugs, add notes to tests and even link back to screenshots or other artifacts, due to its web-based nature.

Contact us to for a free trial



Friday, May 6, 2016

Loading Test Results from Jenkins using the APIs

Loading test results from Jenkins to TestRecon is very simple. You set it up once and your test results will be automatically loaded to TestRecon every time they are executed. By doing this, you no longer need to spend time looking for test results in multiple locations, all your automated results will be in one place! Also, TestRecon provides powerful reporting capabilities and trending that will make the regression review process more efficient, faster and enjoyable.


The picture below describes how loading from Jenkins using the APIs works
If you are already executing tests using Jenkins you are almost ready to go. All you need to do is install the Jenkins Powershell plugin (Jenkins in Windows) or add a step to run a curl script (Jenkins running in Linux). The scripts are available for download from your account on the TestRecon website.

If you are planning on using Jenkins, you need to complete the following steps first:

1) Have Jenkins installed and running on a local machine or server. Jenkins is very simple to install. Here are some instructions.

2) Create a Jenkins Job. This job will be different depending on the technologies that you are using. For example, you may be using ant, gradle, or maven.

3) Configure the job to pull the test code from source control and execute the tests. The tests results files will be stored in a folder by Jenkins. Here are some simple instructions for ant

4) Configure Jenkins to execute a powershell or curl script to call the TestRecon APIs. In that script, you will specify the location of the test result files and the test suite where the tests belong. The scripts are available for download from your account in the TestRecon website.


Here are is a sample tutorial from an external website:







Friday, April 29, 2016

Getting up and running with TestRecon

Getting started with TestRecon is very simple.

You are not required to make any changes to your existing automation framework!

All you have to do is load the test result files that your test framework already generates! 

TestRecon supports most frameworks that produce xml-based result files, like JUnit, C#, TestNG and others. It also supports Cucumber and Selenium.

Contact us for a free Trial

The picture below describes how loading results to TestRecon works.


You have 3 different choices when loading results, one manual and two automated.
  1. The manual way is to upload test results manually from the website, one by one by going to the corresponding suite and clicking the Upload button.
  2. The first automated way is to use the TestRecon REST APIs to load the results. To do that, all you need to do is configure your continuous integration or test execution tool to call the TestRecon APIs once the tests complete. 
  3. The second automated way is to download and install the Spotter tool from the TestRecon website. This tool is basically an agent running on the test execution machine. Spotter looks for test results files in a particular folder and then uploads them to TestRecon. All you have to do is configure your continuous integration or test execution tool to save the file in that location once the tests complete.
Once your results are loaded you can generate dashboards with trends, charts and most recent results. You will also be able to annotate test results and link failures to bugs stored in your bug tracking system.Get started now!