Life Sciences Company Striving to Improve Cancer Care Increases Productivity with Custom Test Automation Framework
This customer is revolutionizing cancer management with treatment diagnostics software. This software will allow doctors and researchers to understand what types of cancer treatments will be most effective before the administration of treatment. We were excited to begin work on this project because who doesn't want to be part of a cancer-fighting solution?
NodeJS, TypeScript, Mocha, InversifyJS
San Diego, CA, US | Cairo, Egypt
Proudly partnered since 2019, we built a custom test automation framework for this treatment diagnostics software, enabling our customer to focus on the reliability of their product. This framework also paves the way for higher productivity, allowing them to tackle more challenges in the cancer-fighting arena and provide better information for patients and their families to make the most informed treatment decisions.
Improving cancer management is no easy task. There are a lot of variables and data to take into consideration. The application you build to process all of the data and help with informed decision-making is complex with a ton of scenarios.
How do you provide a solution for testing API integration systems that each have their own unique set of test cases? A solution that can be maintained by non-programmers or those with limited programming experience? A solution that can be scaled once new test cases are ready to be added? A solution that does not require repetitive manual labor and can ultimately be automated?
We thoroughly analyzed our customer's requirements, feedback, and scenarios in addition to automation testing tools. With no ideal solution on the market, our team of two engineers built a custom, modular API testing framework to fit this life sciences company's needs to a tee. This solution combined the best features of ready-made test automation frameworks from around the web into one easy-to-use and maintainable answer. The framework also allowed the customer to increase the number and variety of test cases performed.
Did we mention it was a custom framework? The customer had full control over the functionality of the framework and could ensure the framework checked all of their boxes. It executes basic REST operations and performs validations on the status code, message, headers, and body of the response.
A Closer Look
How it Works
Test scenarios are written in easy, human readable YAML files. The custom framework executes the YAML files and analyzes the test scenarios. Because YAML files use plain text, minimal development effort is needed to execute the API testing. The YAML files also make the framework extendable and allow it to complete more sophisticated, business-driven test scenarios.
After executing the framework, two files are generated. One is an HTML report that includes the number of passed and failed test cases, in addition to the comparison of expected vs. actual results achieved. The second is a log file that can be used for further debugging or logging.
YAML vs. BDD Files
While YAML files and BDD are both written in English-like, easy to read sentences, YAML files allow you to customize test scenarios without having to write any code. YAML files can also be considered more efficient. For every test scenario using a YAML file, you only need to create one file. With BDD, you must create two: a feature file and a specs file to translate the English-like sentences into coding standards.
In addition, new APIs can be added on and run by creating a new YAML file or extending an existing YAML file. Still, no coding required. With BDD, a code must be written for each new API to get the code to the required test cases.
The framework supports multiple features. For example, the before-each and after-each features is used to run a method before and/or after each test case. This saves engineers the hassle of having to write the API every time. It also supports parameterization. The parameterization allows you to extract data from a different configuration file and helps centralize the data in one place rather than being static.
A second feature of the framework is that it supports data-driven testing. The same scenario can be run on multiple test data by configuring multiple test data sets. A list of variables can be added, and the framework will run it as many times as the number of variables on the list. Write it once, run as much as you want.
Additionally, the functions that are in the main class of the framework are accessible, which enables developers and engineers to extend the framework without writing any code. The API framework can be extended through API tasks, used to create a scenario that is integrated with more than one system.
With this framework, modifications can be easily made in no time at all. Just apply changes to the targeted test case and re-execute the desired scenarios and test cases with no code modifications needed.
We wanted to guarantee the best framework we could possibly provide and make sure this cancer-fighting company had the tool it needed for as long as possible. Keeping versatility and longevity in mind, here were some other essential factors behind the framework we built:
Ease of Use
This framework requires no additional coding because it uses English-like syntax and you only need to remember one command to execute any or all test cases.
This framework can be used for multiple projects. If you need to execute an API, just send the URL And validation you need to apply.
New APIs can be tested by creating a new YAML file. This makes adding test cases a piece of cake.
Little to no coding is required to upkeep the framework. Changes and modifications in the API are applied within the API file. Test data is easily changeable. And test cases do not need to be rewritten to be retested.
Check out how we create change in the Life Science industry. Read more life science case studies here!
Technology Stack: A Brief Overview
Reports in this framework were customized and built from scratch. This gave us full control to add, remove, or customize the information. The reports also helped in debugging and tracing why code failed or why it was not producing the expected result.
# of APIs supported
# of test cases built
# of total test cases
# of passed test cases
# of hours for framework customization
# of hours to build core framework
Let's get together. Set up your free technical consultation and find out how we'll bring our vision, mission, and values to successfully execute your next project.
Our team of one architect and one of our senior-most quality engineers spent about one month to build a custom test automation framework that covered 23 APIs and 460 test cases. Our customer was able to boost their productivity, saving as much as 90% of their time with this automated framework. That lets them contribute more in less time and focus on expanding their work in cancer management.
Let's not overlook the fact this was a joint effort. The clear requirements provided by the customer allowed us to put our best foot forward and provide a unique but well-fitting solution for this company. We appreciate their support and look forward to creating a bigger impact in phase two of this project. Stay tuned for more!