How the development of automated test scripts has increased test coverage and improved the overall quality of the software on the Morphologi 4 and 4-ID

My role as the Software Test Engineer of the Morphologi team is to ensure that changes made to the software meet the acceptance criteria and the high-quality standards of the overall software are still met. I find the work we do at Malvern Panalytical fascinating, however, testing software used for applications like Morphologi 4 and 4-ID has its challenges – the biggest of which is the time required to run some of the tests. Running a measurement on a Morphologi system can take anything from a few minutes to a few days and testing the software requires running many measurements with different settings.

A typical test case will usually consist of the following steps:

  1. Launch the software and wait for the instrument to connect
  2. Create a new SOP with certain settings – these will vary depending on what is being tested.
  3. Run the SOP
  4. Check that the measurement completed, and a new record was created, containing the measurement data.

Additional steps or checks may be added, depending on the feature being tested. In a lot of cases, the test will need to be repeated on each available optic (2.5x, 5x, 10x, 20x, 50x) and the same feature may be tested with a range of different values. The number of iterations and test cases soon builds up, and running each of these tests takes time.

Time can be saved by running particularly long measurements overnight or over the weekend. Unfortunately, some measurements rely on user interaction which cannot take place if there is no one there. Also, observing what happens during the measurement is also beneficial as any unusual events that occur can be identified for further investigation and testing. There are several long measurements that need to be performed, and only 1 can be run each night, resulting in only 5 tests being run a week – which may need to be rerun depending on the outcome of the test!

We’ve solved this issue by developing a series of automated test scripts which are designed to create SOPs and run measurements on the Morphologi 4 and 4-ID software. Any user interactions required during the test can also be automated and all events that take place during the test are added to the test report which is checked and analyzed so we know if anything went wrong during the test, when the error occurred and why. This makes investigating and fixing bugs a lot easier. A list of individual tests can be added to the test runner and run overnight. This means that instead of 1 individual test being run each night, we can run several tests. Even more, can be run over the weekend. Automated tests can also be run during the day, freeing up time to run additional tests manually.

Each test that passes increases the confidence in the software. Each test that fails highlights an issue with the software that needs to be fixed. This also highlights risky areas of the software that may benefit from more rigorous testing. By increasing the overall test coverage through both automated and manual testing we have improved and increased confidence in the overall quality of the software platform for the Morphologi 4 and Morphologi 4-ID.

You can find out more about the Morphologi 4 and Morphologi 4-ID and how these instruments help our customers gain a deeper understanding of their particulate materials in sectors as diverse as pharmaceuticals, metal powders, building materials and forensicsand many more!

Related content: