Java to Cypress-JavaScript Automation Migration
Introduction:
Across Cancer Research UK engineering department, we
currently use a Java automation framework for our User interface and API
testing. The framework has evolved in the last 3 to 4 years and currently, we
have 19 products/project, (running approximately 1350 test scenarios) using the
framework to run the respective sanity/regression packs. The project/products extend
across different technology stacks such as Drupal, Symphony, React JS, .Net,
OBI and Siebel CRM.
The Quality Assurance (QA) test team are
currently under the process to be transformed into a fully-fledged Quality
Assurance function. As part of this
transformation, we would like to have a comprehensive, automated test suite
that can be maintained by developers and testers. Furthermore, our front-end
web development is moving into JavaScript, now is the right time to migrate our
automation framework also from java into JavaScript.
The introduction shows why there was a need to implement this project and the business benefit to the organisation.
Range of Test Automation Tools
Screenshot from (https://medium.com/@briananderson2209/best-automation-testing-tools-for-2018-top-10-reviews-8a4a19f664d2).
In the above screenshot, you will notice that Selenium is
rated high and very popular, however, it requires a high advance testing skills
to install and make use off. It can be very daunting getting started on
selenium, however, it’s very popular for being the first automation tool
testers chooses to test. It also has wide support available for free to help
from.
How to Perform an automation Test
In order to perform an automation test, one must do thorough
research on the best automation tools available. Think about the cost and if
it’s an open-source, what sort of support is available. One must also know the language
to perform the automation, for example, Java, JavaScript, python etc. One must
also consider the benefit of such a tool, is it open source, can other tools be
integrated and how easy it is to set-up and get started.
Once all these factors have been considered, then the tool
can be downloaded and installed. During test script design, one must apply the
best automation Testing practice and tips –
- · Testing must start early.
- · Test more often- regression testing.
- · Decide what test cases to automation (some test cases are best left as manual testing).
- · Create good quality test data
- · Create tests that are resistant to changes in the User Interface(sometimes, elements and test data are updated and changed, causing errors within the automation code. Fixing this can be costly).
- The plan to enable Quality Assurance(QA) and Developers to collaborate more so we can build and run more tests on each commit, focus on more API automation testing, shift left testing, develop the QA team to have more cross-skilled testers.
- This shows my understanding of this project and the business value to the organisation.
Why a new Framework:
Currently, the maintenance, execution of automation regression takes too much of our time. Also, because some parts of the framework were developed by a third party, some QAs had difficulty understanding the flow or structure.
Why Cypress?
Before we chose cypress, we researched other
possible frameworks:
The Benefits of Software Automation Tools
- · Test Automation tools, if used as documented, are more reliable and consistent than human software testers.
- · Human testers may grow tired carrying out manual tests over time, while test automation does not weary out.
- · Suitable for repetitive tests steps with different data sets.
- · Automation test scripts are reusable.
- · Generates detailed tests results with metrics.
- · Comprehensive testing (covering all functional points) is possible.
- ·
Manual testing all
scenarios with positives and negatives can be time-consuming.
- ·
However, automating
testing can be cost-effective, improves flexibility without the intervention of
human beings improve the speed of execution time.
Risks of Software Automation Tools.
·
Unrealistic
expectations from the tools
·
Automation tools
incompatibility with the organisation’s test environments and other software
testing tools.
·
If automation tool is
expensive then it can have an impact on the project budget.
·
Vendors inability to
provide technical support.
·
If a Vendor goes into
liquidation.
About this Project.
Project Brief
The purpose of this project is to document the process I went through to convert the e-commerce website’s java automation into JavaScript using Cypress.
We were required as testers to create Jira tickets for each test basis or feature files from the test basis. We began coding by pulling the main developer repository from our GitHub (version control), then created new branches from the main branch, with a reference to the Jira tickets. Each code was required to go through code review before it was accepted to be merged into the main Develop branch. By following this name convention, I know I am doing my job well.
Test Plan
Find more details of the Test Plan here.
Comments
Post a Comment