Get the latest critical update information for Log4j vulnerability. See how to address the issue with Parasoft guidance. Learn More >>
It’s easy to look at the commercial B2C space and see why Agile and DevOps methodologies have taken over as the dominant practices for delivering quality services at speed to customers. That’s not the case with government applications. But with AI-driven functional testing solutions, QA teams can validate government applications and modernize delivery.
In the government sphere, there are many obstacles impacting agencies’ abilities to benefit from Agile and DevOps practices in the same way that’s been the luxury of the commercial space.
One such challenge to government agencies’ aptitude to modernize is how to create an effective automated functional testing strategy for web user interfaces in the common instance of outsourcing development to a third-party vendor. This is a scenario I come across often in my role as an account manager for Parasoft’s government, military, and aerospace solutions.
In this scenario, the government entity will contract with an external vendor to create and deliver the new software or new functionality. The third-party contractor is responsible for ensuring that the code meets its customers’ requirements around quality. However, it’s crucial that upon delivery, the government entity must do its own testing to verify that the application behaves as expected in the integrated environment and meets the nonfunctional testing requirements like usability, reliability, performance, and security.
Based on the contract created between the government entity and the third-party development contractor, the ability of the government QA team to use modern automated testing strategies that are successful in the commercial industries may be handicapped.
To create an effective automated testing practice, functional testing teams need to test at both the web UI and API service layers. However, testing effectively at the API layer requires a certain knowledge of artifacts that a government QA team may not have access to, depending on what was and wasn’t specified as deliverables in the contract.
Let’s say the contract does not dictate creating and maintaining API service definition files for each service. Upon delivering to the government QA team for test purposes, the QA team will have a difficult time understanding:
Development teams need all of this information to create an effective API testing strategy. Without the API service definition files, the QA team needs access to the codebase and developer knowledge to study the code and understand the construction of each API.
For many QA teams, this isn’t feasible. Instead, they rely heavily on web UI or user acceptance testing to validate software deliverables are passing thresholds for quality, reliability, usability, and performance.
Web UI testing has its place. However, there are some major challenges to web UI testing to overcome for it to be an effective sustainable test automation strategy.
To kick off this conversation around web UI testing challenges, let’s first look at what people are using to create automated web UI tests. Resoundingly, Selenium is the leader in the space with over 64% of the industry using this open source framework today. However, if you are a Selenium user, you know that it’s not all rainbows and sunshine. There are some challenges to using Selenium that make it difficult to scale for sustainable automation.
Selenium is the solution of choice for several reasons that are valid in both the commercial space and the government space. As an open source tool, Selenium:
Let’s look at the cons. Like all web UI tests, Selenium tests are still brittle and don’t withstand change well. For example, small government QA teams creating Selenium tests against new functionality with thousands of existing Selenium tests. One small change in the UI can have a huge impact.
That one change affects your team’s ability to test the new functionality thoroughly. Suddenly, old tests break with little insight into what happened. It may take days to manually update impacted tests, affecting the testing schedule and coverage.
With the introduction of Parasoft’s newest tool, Selenic, maintaining Selenium tests is no longer a challenge. Selenic is an AI-driven lightweight solution that plugs directly into your Eclipse or IntelliJ IDE where you would create Selenium tests.
Selenic users can activate the Parasoft Recorder to capture user actions performed in the Google Chrome browser. You can leverage the recording to create a pure Selenium test using the recommended best practice: page object model.
For a government QA team that needs to create tests quickly with limited resources, the Parasoft Recorder gives them a head start. The tool enables you to easily create the Selenium project and skeleton of the page object model test. Keep in mind, the tests created with the Parasoft Recorder are like any other Selenium test. You can run them when you want, how you want, and where you want. They aren’t locked to a vendor platform.
The true time savings comes into effect with Parasoft Selenic’s AI-driven recommendations. You can automatically repair tests at runtime that broke due to a web UI change such as a locator or wait condition. Small QA groups with too much to test drastically reduce time normally spent on test maintenance or trying to understand if a failed test breaks due to a change in the UI, a true regression failure, or simply a bad test.
The AI within Parasoft Selenic analyzes the tests at runtime. Any tests that would normally fail due to broken locators or changing wait conditions are automatically repaired so the execution of the full test suite is not derailed during an extended run.
When the QA team reviews the test results, a full report is ready to review in the tester IDE. It shows:
Testers have two options:
For instance, some QA teams might prefer CSS vs. XPath to locate dynamic web elements and elements without ID or name.
QA teams can easily transform their Selenium-based web UI testing practices into a truly scalable and maintainable test strategy with Parasoft Selenic. But what about the APIs?
Yes, it’s true that web UI test execution often invokes APIs. However, the web UI tests are not testing the API.
APIs are the backbone of modern web applications. Data and information pass through them from system to system inherently introducing risk.
For a government agency to truly validate that the functional and nonfunctional requirements of their applications are met — reducing agency risk — it’s crucial that they also implement a sustainable and effective automated API testing strategy. Unfortunately, API tests are not as easy to manually create as web UI tests. Resource constraints often impact the scale to which an organization tests their APIs.
API testing requires code knowledge. Even when an agency has the resources available to test, they may be handicapped from using modern API testing solutions that leverage API service definition files for test creation if these assets are not contracted for delivery to the agency from the third-party development vendor.
Parasoft SOAtest solution for API and end-to-end test automation offers both a bottom-up and top-down approach for API test creation.
For teams doing in-house development and looking to test their APIs early in their SDLC, Parasoft SOAtest offers the bottom-up approach for scriptless API test creation through either request/response pairings or through the consumption of service definition files like Swagger, WSDL, or WDLE.
For browser-based REST APIs, Parasoft offers a top-down approach that utilizes AI to scriptlessly convert manual web UI activities into full API test scenarios.
I previously mentioned the Parasoft Recorder. Parasoft Selenic users record actions on the web UI and convert them into non-vendor locked Selenium page object model tests. When used with Parasoft SOAtest’s Smart API Test Generator module, this same recorder can create full API test scenarios.
When using Selenic and SOAtest together, a QA tester can record a user story on the web UI. From that single recording, the QA tester can create a Selenium test and a corresponding API scenario test. The artificial intelligence engine in the Smart API Test Generator analyzes the traffic recording. It looks for patterns and relationships between the APIs being invoked. It also looks at how data is handled and generates a complete API testing scenario following the user story.
No scripting, no service definition files and no domain knowledge is needed to create these tests. As the API test scenarios being created directly correlate to the web UI activities conducted by the QA engineer, novice users are able to gain a greater understanding of how the APIs are being used in the system and the APIs’ relationship to the UI.
Small government QA teams with limited resources and a lot to test can validate government applications quickly. The ability to create self-healing web UI Selenium tests and automated API test scenarios at the same time is powerful. Using an effective automated functional testing solution, teams can do more thorough testing with minimal manual effort, resulting in better coverage and quality.
Want to learn more? Watch our on-demand webinar to see Parasoft SOAtest and Selenic in action. Connect with the Parasoft Government Solutions team at GovernmentSolutions@parasoft.com.
An account manager at Parasoft, Jamie works closely with customers and prospective clients. Her expertise in helping organizations reach their goals through scalable and easily adoptable test strategies has helped her customers to organically shift from waterfall to agile and DevOps methodologies.