Google Summer of Code: 2nd Week

this year’s GSoC journey is in its second week. The key objective of this week was on setting up an E2E test with cypress and cucumber for the refapp-3.x. The refapp-3.x didn’t have any E2E test before, so that was a bit challenging. So I decided to start with a small one; a workflow to check the login feature.

All the QA tests OpenMRS has been moved to a single repo named openmrs-qa-framework. You could find it here. QAFramework is an OpenMRS’ behaviour-driven development (BDD) quality assurance framework.

Luckily the cypress and cucumber were already set up with the project. If you are interested in setting it up here’s a good tutorial: Using Cypress with Cucumber to test your app as if you were a user

Let me explain what I did. First of all, I created a feature file. A Feature File is a point of entry into the Cucumber tests. This is the file in which you will describe your tests in Descriptive language.

The next step was to implement the steps with cypress. Here the base URL is loaded from a registered task at cypress to read properties from property files. The idea is to have a property file to hold whatever properties we needed. Since we are testing multiple Ref Apps, multiple property files will be there.

After running it using the cypress runner, it will run the steps for us. Here’s the output.

I sent a PR with the changes, have a look:

Moreover, I joined both the OpenMRS QA team and the Microfrontend squad and presented my work as well. Next week, I’m planning to write a test for the registration workflow. Thanks, Google and OpenMRS for this wonderful opportunity!

Let’s get connected

Follow/connect with me anytime.

Github: https://github.com/jayasanka-sack
Linkedin: https://www.linkedin.com/in/jayasanka-sack
Facebook: https://www.facebook.com/jayasanka.sack

The drawing is inspired by RedBull. :D