My Innovative Solution to Continuous Testing: Let Business Analysts Self-help Create Data in a BuildWise CT Server
A practical and innovative way of using End-to-End automation scripts with a Continuous Testing Server.
A repost of my past article on Medium.
In the article, Benefits of E2E Test Automation and Continuous Testing (Part 3: to Business Analysts), I wrote, “Business Analysts (BA) are often among the first ones to realize the great benefits of E2E test automation and CT.” Why? Automation Scripts help create data scenarios for them.
Business analysts frequently want to get a particular data scenario in the application. To achieve that, they spend a lot of time using the application. It is very inefficient: slow, and error-prone. This is not obvious in the initial phase, as the app is relatively simple with limited functionality implemented. Along with the development, these data-creation activities will consume more and more time, not just for business analysts but also for manual testers and developers.
I once worked on an insurance claim application. Lodging a proper claim (with many different categories) could easily take 4 minutes even if every step was done correctly. After seeing that, I created a suite of automated scripts (in Selenium Ruby) to get newly lodged claim numbers for a few sets of scenarios, of which each took 40 seconds on average.
Please note that saving is more than 83% of the time (40 seconds instead of 240 seconds). It is actually more like 99%. Why? Because the BAs can perform other activities during the test execution.
After one business analyst found out using my automation scripts to help test data creation, naturally, I received requests from all the BAs for data, such as “a claim on contents only”, “home and content policy with over 1 million”, “a third-party motor claim”…, etc. Soon, the manual testers joined the club.
Suddenly, I became “the most popular person” in the team, receiving many Slack messages daily to create test data for them. I needed to come up with a way to handle the requests more efficiently. After all, I have my own work to do.
By the way, don’t offer this unless you are proficient (at least Level 3 of AgileWay Continuous Testing Grading) in E2E Test automation and CT. To meet the demand, inevitably, you need to add/alter automation scripts, …
Table of Contents:
· Your team members can run automated test scripts, too.
∘ Method 1: Let them run the automation scripts in TestWise on their own computers. 👍 but not practical for everyone
∘ Method 2: Self-help run a set of automation scripts in BuildWise CT Server. Good 👍👍
∘ Method 3: Self-help invoke a specific automation script on-demand in BuildWise CT Server. Better 👍👍👍
· FAQ
Your team members can run automated test scripts, too.
Please note that E2E Test Automation’s audience is the whole team. In a real agile software project, nearly every team member runs E2E automation scripts daily.
Method 1: Let them run the automation scripts in TestWise on their own computers. 👍 but not practical for everyone
In my opinion, it is quite simple to do.
Install TestWise (a testing IDE), in a few minutes.
Install Git.
Using Git clone to get automated test scripts, then afterwards
git pull
to update the test scripts.Find the test script and run it.
I put data creation automation scripts in a special folder, so finding them is quite easy.
Guess which step that BAs don’t like the most? Step 3.
Mostly, business analysts feel uncomfortable working directly with code/scripts. They are afraid they might introduce changes and break something.
Therefore, I usually don’t recommend this option, even though there are individuals with a technical inclination who favoured this approach.
Method 2: Self-help run a set of automation scripts in BuildWise CT Server. Good 👍👍
I created several special Build projects in BuildWise CT Server for BAs only, like the one below:
A business analyst can click the “Build Now” button (in the BuildWise CT server) to trigger a build. He/she may move on to other tasks, such as having a coffee, and then get the desired data later on BuildWise.
The test output is shown on BuildWise (clicking the ‘Output’ link). The test output might contain important data records, such as “receipt number”, and “new insurance application number”.
This approach’s Pros:
Simple. Just a click of the button.
Get a set of test data scenarios.
And Cons:
It may take a long time.
When I arrive at work, the first thing I do is to trigger a run of this special build project in BuildWise so that some test data will be freshly available to BAs. For more, they could do it themselves.
Method 3: Self-help invoke a specific automation script on-demand in BuildWise CT Server. Better 👍👍👍
Let me show you this BuildWise feature with an example.
1. Locate a specific test script, in a recent build (on BuildWise)
A Business Analyst (or manual tester) can click the ‘Show test script’ icon to view the automation script.
As you can see, because of using the Maintainable Automated Test Design, the automation script is quite easy to read (for anyone in the team). By the way, the test scripts shown above using RSpec, simple and neat. No junky stuff async(), await, () => {, })
you found in bad JS automation frameworks. (FYI, cypress.io is dying)
2. Enable the “execution mode”
Click the vertical ‘…’ on the top right and select “Enable Execution”.
You will see the “Execute” buttons next to the test script and test cases.
The top “Execute” one is for the whole test script; the below ones are for individual test scripts.
Click one of the “Execute” buttons to run the test. Below is a sample output.
Once the execution is complete, you will see the test output, rightly on BuildWise in your browser!
FAQ
1. Where does test execution occur?
The machine where the BuildWise CT server is installed.
2. How can I get BuildWise? How much does it cost?
BuildWise server is free (both in freedom and free beer). It also won the 2018 Ruby Award for its quality, easy-to-use and innovative features. You can download and use it today.
Check out my daughter’s article, Set up, Develop Automated UI tests and Run them in a CT server on your First day at work.
3. How can I run tests against different servers, e.g. Dev or Test, via BuildWise?
Two ways.
a). In the BuildWise project settings, set a different BASE_URL before a run.
b). If executing against different servers is often, you can clone one to create another dedicated build project, which can be named “BA Test Data — Staging Server” or similar.
Related reading: