Life Sciences Company Striving to Improve Cancer Care Increases Productivity with Custom Test Automation Framework

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?


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.


Services

Test Automation

Company Summary

Technologies

NodeJS, TypeScript, Mocha, InversifyJS

Project locations

San Diego, CA, US

Industry

51-200 employees

Size

2019

Customer Since


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?


CHALLENGE


We thoroughly analyzed the 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.


SOLUTION

Is a test automation framework right for you?

Find out today!

A CLOSER LOOK



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

How it Works


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.


YAML vs. BDD Files

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.


Want to build your own custom test automation framework?

We can help!


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:


1

2

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:


4

3

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.

Reusability


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.

2

1


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.


Maintainability

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.

4


New APIs can be tested by creating a new YAML file. This makes adding test cases a piece of cake.

Scalability

4


New APIs can be tested by creating a new YAML file. This makes adding test cases a piece of cake.

3

4

4


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.





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.


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 structure, one advantage of incorporating it is it decreases the chance of developers breaking the core code. Running TypeScript over NodeJS meant that we could built a cross-platform framework since NodeJS can run on any system.


We also used InversifyJS, a lightweight inversion of control (IoC) container that can be used with TypeScript and JavaScript systems.


# of total test cases

# of passed test cases

460

460

331

23

# of APIs supported

# of test cases built

# of APIs supported

23

# of APIs supported

23

23

# of APIs supported

# of test cases built

331

100

60

# of hours for framework customization

# of hours to build core framework

# of total test cases

460

# of passed test cases

460

100

60

# of hours for framework customization

# of hours to build core framework

100

# of hours to build core framework

# of hours for framework customization

60

Discover what a custom test automation framework can do for you.

Contact us today!

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!

We hope you've found some useful insights to take away from this post! Want to know if a test automation framework is right for your needs?

Contact us today!

Discover what a custom test automation framework can do for you.CONTACT US