How to Create Load Tests, Execute, Read Reports, and Manage Tests in LoadNinja
LoadNinja reduces load testing time by half, replaces load emulators with real browsers, and provides actionable performance testing metrics without no scripting required. These features enable development teams to bring load testing in-house since the tests are easy to create and maintain with no internal infrastructure requirements.
LoadNinja’s key benefits fall into four areas:
LoadNinja also works with Jenkins—the focus of this article—and any other continuous integration service via its public REST API. This makes it easy to incorporate performance tests into a test automation suite alongside unit and functional tests.
The next part will walk you through how to manage continuous performance testing using LoadNinja. Start your free, 14-day LoadNinja trial.
LoadNinja makes it easy to build load tests in a browser-based interface with no or minimal code. Before getting into test automation, let’s get started by recording a simple test, configuring the load test, and seeing how to read the results. We can then implement this test scenario into Jenkins to automate the process. Note: If you don’t have an account already, you can sign up for a free trial to follow along or try it on your own application.
Start by creating a new project:
The next step is creating a test script:
Note: LoadNinja simulates script events using hard-coded parameter values during the editing stage by default. However, you can use a databank (e.g. CSV or TXT file) to expand test coverage with more parameters. Simply upload the file and assign each column to the associated input. This lets you test multiple search queries, user logins, or other details to create broader test coverage than static hard-coded parameters.
LoadNinja also makes it easy to test client-side interactions and automatically handles encryption, authentication, authorization parameters, and many other complex scenarios. Since every test is recorded and replayed in a real browser, our platform automatically supports third-party frameworks like React, Angular, and HTML5. These are issues that can require significant extra scripting using protocol-based load testing platforms, such as JMeter or Gatling.
Next, create a scenario and run the load test to ensure that it runs properly:
Finally, you can see the results and debug any issues:
The entire process is much more streamlined than using JMeter, Gatling, or other load testing tools that require a lot more scripting and configuring to properly measure modern applications. In addition, the results are much more accurate and actionable since they use real web browsers rather than measuring protocol level traffic.
LoadNinja makes it easy to accomplish load tests in a fraction of the time that it would take with a conventional load testing platform. Fortunately, it’s just as easy to implement these load tests into a continuous integration environment, like Jenkins, that builds and tests software projects continuously after each commit or merge. That way, any new code changes that break the software are instantly identified and flagged before reaching production.
Start by downloading the LoadNinja plugin for Jenkins:
Next, create a new Jenkins project:
Note: You can also add LoadNinja as a build step in an existing project. For example, you may want to add performance testing to your functional test suite that runs before a merge to a production branch on git.
Finally, configure the test results:
Performance tests can be run at any stage of the development process. Since it’s resource intensive to run after each commit on a development branch, most development teams run the tests before each merge with a production branch to ensure there are no bottlenecks. Jenkins makes it easy to automatically trigger tests through integration with git or using tokens, putting developers in control of when and how they run the test suite.
If you’re not using Jenkins, LoadNinja provides a REST API for integrations with other continuous integration platforms, such as CodeShip or CircleCI.
Most people limit the load testing to average response times, but there are many other metrics that are important to consider. For example, high error rates can degrade the user experience even if average response times are low. The number of concurrent users is also an important consideration since response times depend on the load. And finally, none of these metrics matter unless developers can identify and fix the bottleneck responsible.
LoadNinja focuses on four key elements:
You can also access the performance metrics for LoadNinja servers, which helps identify cases where the test infrastructure is the cause of errors that appear in the test results. You can also decide how many virtual users can be engaged in load tests since LoadNinja’s performance differs depending on the complexity of the load testing scripts.
Navigation timings are especially helpful because they can help pinpoint the true underlying bottleneck. For instance, you may notice that the DNS time for a particular step is taking a long time, which could suggest a problem with your DNS provider rather than an underlying application issue. LoadNinja’s inclusion of DOM load times also sets it apart from other load testing platforms that only measures server requests and responses.
When it comes to continuous integration, it’s a good idea to set minimum thresholds for error rates or durations in order for the test suite to pass. You should also ensure that you’re testing with an appropriate number of virtual users for your expected loads. The goal is to identify any performance bottlenecks at expected peak loads, not crash the application under an unrealistic load that you don’t expect to see in production.
Test automation is critical for software development teams that want to move at a high velocity and increase feedback while maintaining or optimizing quality. Over time, test suites can become unwieldy and difficult to manage, particularly for product owners that aren’t involved in the low-level creation and maintenance of tests. Test management solutions can help ensure collaboration and traceability throughout the development lifecycle.
Zephyr for Jira is the most popular suite of test management tools for Jira designed to optimize the speed and quality of software testing, empowering teams with flexibility, visibility, and insights. From test plans to quality metrics, the platform makes it easy to keep everyone on the same page with test automation and integrations with popular continuous integration tools. You can even use advanced search queries with ZQL to find specific tests within a project.
It’s easy to integrate LoadNinja’s load tests with Zephyr for Jira and Jenkins to provide access to these collaboration tools and capabilities.
Start by downloading the Zephyr for Jira plugin for Jenkins:
Next, add the post-build action to Jenkins:
In Zephyr for Jira, you can click on Tests to see the results of the tests. In Cycle Summary, you can see all of the previous tests that ran in the past and whether they passed or failed. Developers and stakeholders can log in to Zephyr for Jira at their own leisure to view these test results without test engineers having to send over reports to hold meetings. Any problems can be easily converted into bug reports and flagged for follow-up.
Table of Contents