Wednesday, March 9, 2022

Why parallelize tests?

Parallel testing is your ticket to faster testing. When testing applications, it is important to remember that time is an important factor. Testing an application 100% is a noble cause, but it's not always easy to achieve the desired test coverage. Parallel testing allows you to run more tests in a shorter amount of time.


Imagine the situation: you have 500 ui tests that run in 4 hours. Four hours to run is a lot, but if you divide these 500 tests into 8 simulations, the run will take 30 minutes!


Parallelizing tests using Xcode

You will need:

  • Xcode version ≥ 11.7;
  • Test plan containing ≥ 2 classes with tests.


In the test plan, you need to select “Execute in parallel”


After that, you can simply run all the tests in your test target and Xcode will automatically create multiple clones of the selected simulator. It's important to note that Xcode divides tests into classes, not an equal number of simulators. For example: you have 3 classes with tests:


The first contains - 3;

The second contains - 2;

The third contains - 10.


In this case, xcode will create three simulators and run them on each class with tests. Xcode will not split them equally for each simulator.

Effectiveness of software quality assurance

1. A professional is always more efficient than a subcontractor or generalist. Axiom.

2. Sometimes a good IT professional can show results better than any tester. But the cost of such a resource can be much higher than the cost of attracting a tester. For example, Joel Spolsky wrote in his blog that for this money you can attract three testers.

3. Exception: for small projects, small teams, or agile development, it is effective to use generalists, because the project time is small, and communication costs in the form of exponential growth from the number of project participants - as described by F. Brooks - have not been canceled.


Real-life examples:


1. "Rake" (slang) = Human factor. This is treated using automatic means.

2. "Blurry eye". A person gets tired of checking repeatedly. Testers must be resistant to routine, repetitive operations. In order not to completely rely on a person, formalization is used - drawing up test plans, test scenarios (test cases), test checks - so that a person does not forget and does not invent, but performs strict verification steps.


Let's look from the side of resources and tools:


1. Manual testing - there are many options for combining.

2. Automated testing, especially load testing. Knowledge of tools, languages, protocols, techniques is required - and this requires specialization.

Why parallelize tests?

Parallel testing is your ticket to faster testing. When testing applications, it is important to remember that time is an important factor. ...