Use the Scientific Method to Improve Your Testing | TTC Middle East

Use the Scientific Method to Improve Your Testing

Megan Bruney from TTC's US marketing team recently attended Agile Testing Days. She watched a keynote by Raye Hurst and Nicole Errante that really resonated. Here’s her recap of their main points.

Megan

Testing software is a lot like doing a scientific experiment. It’s not a linear step-by-step process but it is based on observation and experimentation using the five guided principles we all are familiar with from early childhood education - the scientific method, which includes: stating the problem, formulating a hypothesis, designing the experiment, collecting and analyzing the data and drawing and reporting the conclusion.

Here’s an example: we have a plant and want to see what fertilizer, levels of sunlight and volume of water works best to make it grow. The problem is, we are not sure how to maintain and take care of this plant successfully. The hypothesis is guessing what might work when growing the plant, then we experiment using the different soils, sunlight, and volumes of water. After experimenting, we collect and analyze the data by comparing what is working well and what wasn’t effective. And, we record it.

The same process applies for testing. We start with a software program, review the story, ascertain the expected results, execute the tests and report if the tests passed or failed. The goal is trying to generate questions by experimenting on finding the flaws in the software and not trying to prove that the software is perfect.

Here’s another reason this process can relate to testing. A scientific experiment has three variables; the independent variable, which can be manipulated or changed by the scientist, the dependent variable which is observed or measured and affected by independent changes and the controlled variable, which must be consistent and remain the same. Just like a scientific experiment has variables, in computer programming the variable is a named container used to store information. Examples of these variables consist of:

  • each input
  • selection of radio buttons
  • how the record is saved
  • how enrichment is entered
  • date format
  • specific data entered
  • HTML editor

The independent variable in testing is the one input at a time starting with the enrichment item, the dependent variable is the outcome that the record does not save and the controlled variable is all other the fields that remain their default or previous value and when the save button is used.

Exploratory testing is also a key factor in science and testing as it consists of self-learning, observing test designs, sparking new ideas and test execution to inspire and make sense of findings.Given that science and testing have several similarities, we need to make computer programming more scientific by utilizing the scientific method and hiring more scientists to improve testing.

What makes a scientist perfect for this role?

Scientists have the characteristics needed in software testing, which includes curiosity, asking questions, the ability to communicate ideas through critical thinking, passion, work:life balance, keeping up with current trends and ethics.