2018: The Year to Try CI/CD Automation Testing

Automation Testing Graph

By Vishakha Panat. Is your new year’s resolution to get better at QA? You may want to consider continuous integration/continuous deployment (CI/CD) automated testing.

UCSF’s School of Medicine Technology Services has adopted a CI/CD approach as a fundamental part of its dev/ops philosophy. Following this approach, a build is initiated and test scripts are executed as soon as the developer deploys the code or the tester checks the test cases into the repository. All of this is done without manual intervention, any time of day or night, with results emailed directly to the dev/ops teams.

Automation testing benefits

Automation testing is efficient, saves time, increases test coverage, and improves accuracy. It frees up the tester’s time to concentrate on more complex test cases that cannot be automated. Manually testing repetitive tasks is error-prone and should be avoided whenever possible. The automated scripts are the ideal means to execute the same task with various sets of data.

Use case – PrEP provider system

PrEP is a web application that facilitates prescribing Pre-exposure Prophylaxis (PrEP) to non-HIV but high-risk individuals.

Along with other business workflows, PrEP has a complex survey containing more than 60 questions, and, depending on the information entered in these 60 data points, it yields four different sets of outputs. Entering data to test this survey can be tedious, time consuming, and susceptible to error. By automating this task, the survey is tested for all possible inputs with the single click of a button. All the possible inputs are stored in a spreadsheet, which is a one-time task that is read by the automation scripts over and over again.

Testing the survey with a single set of inputs takes under one minute, compared to 15 minutes to test the same survey without automation, which has saved SOM Tech hours of testing time.

Overall workflow

The feature graphic above illustrates the system flow. When the developer commits the source code or the tester commits the automation scripts to the source repository, GitHub, the Jenkins job is triggered, which in turn initiates the build on the Jenkins server. After the completion of the successful build, the test automation scripts are executed on the Jenkins server and the test results are emailed to the team. However, if the build or execution of automation scripts fail, the changes are rolled back and code deployment is halted. More information is available online about

Testing details

The automation scripts are written using the following components, illustrated in Fig. 2 above.

  • Cucumber: Automation testing framework that supports behavior-driven development (BDD).
  • Ruby: Automation scripts are implemented using object-oriented Ruby
  • Selenium Web Driver: Ruby uses the Selenium-Webdriver, which interacts with a browser the same way people do: clicking links, filling out forms, and validating text.

 

Vishakha PanatVishakha Panat is QA manager in UCSF’s School of Medicine Technology Services.

 

 

Leave a Comment

Your email address will not be published.