Life Sciences Company Striving to Improve Cancer Care Increases Productivity with Custom Test Automation Framework
Company Summary
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?

Services
Test Automation
Technologies

NodeJS, TypeScript, Mocha, InversifyJS

Project Locations
San Diego, CA, US | Cairo, Egypt

Industry
Life Sciences

Size
51-200 employees

Customer Since
2019
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.
The Challenge
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?
Our Solution
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.
Framework Features
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.
But don't worry, the framework allows for coding, too. Developers can write their own JavaScript code into the YAML file. The framework will digest the JavaScript in the YAML file and execute it. Using this methodology, developers can extend the testing scope and add functionality without modifying the source code.
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

Reusability
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.

Scalability

Maintainability
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
We built this framework using NodeJS and JavaScript because it allows the framework to run in any environment. Since JavaScript doesn't have any dictionaries, we developed our own, which we used to introduce headers into the framework.
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.
The code was written in TypeScript but compiled to JavaScript in the runtime. Because TypeScript is more structured, one advantage of incorporating it is that it decreases the chance of developers breaking the core code. Running TypeScript over NodeJS meant that we could build a cross-platform framework since NodeJS can run on any system.
Last, but not least, we also used InversifyJS, a lightweight inversion of control (IoC) container that can be used with TypeScript and JavaScript systems.
23
331
# of APIs supported
# of test cases built
460
460
# of total test cases
# of passed test cases
60
# of hours for framework customization
100
# 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.
Outcome
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!
Related Content
What are the essential elements of a great test automation framework? In this article, Integrant’s team discusses the factors that are crucial for success.
Being agile helped us transition our biotech client from manual to automated testing saving time, money, and plenty of headaches.
Subscribe to our newsletter!
We've been in the software industry for 30+ years so we have a lot to share with you!
Follow US
Address: 16870 W Bernardo Dr, Suite 250
San Diego, CA 92127
Email: info@integrant.com
Phone: +1 858.731.8700
© 2021 Integrant, Inc. All Rights Reserved