Testing Strategies
Why do we need testing strategies?

To ensure that unified data sets are:

  • Correct
  • Complete
  • Up to Date

Types of Testing Strategies

Technical Acceptance Testing (TAT)

User Acceptance Testing (UAT)

Performance Stress Testing (PST)


Testing scripts to ensure they produce the correct output

Can be done manually or by automation

There are three strategies:

  • Unit tests
  • Integration tests
  • Functional tests

Technical Acceptance Testing (TAT)

TAT: Unit Tests


Testing individual functions or lines of code

Uses python library unittest

Naming convention test_xxx.py

Run on your command line: python -m unittest


								import unittest
								def fun(x):
								  return x+1
									
								class MyTest(unittest.TestCase):
								  def test(self):
								    self.assertEqual(fun(3),4)
								

Activity


  • Open a file in Jupyter Notebook and write a function that sums of a list of numbers
  • Write a test case for the function in the same script and name it test_sum.py
  • Write a new function in a different file that averages a list of numbers
  • Write a test case for the function in the same script and name it test_average.py
  • Open a terminal and run python -m unittest

TAT: Integration Tests


Integration tests verify that different modules or services used by your application work well together.

For example, it can be testing the interaction with a database, i.e. are you able to write queries?

TAT: Functional Tests


These focus on the business requirements of an application. They only verify the output of an action and do not check the intermediate states of the system when performing that action.


Formal tests to verify if a report or system statisfies its business requirements

Can be done manually or by automation

User Acceptance Testing (UAT)

Answers questions like:

  • Does the report meet the original requirements?
  • Does the report produce sensible information?
  • Is the design and layout acceptable?

User Acceptance Testing (UAT)


Focusses on validating performance characteristics of the product such as scalability and reliability

They check the behaviours of the system when it is under a significant load

Performance Stress Testing (PST)

Tests are based on non functional requirements:

  • Scalability
  • Reliability
  • Stability
  • Availability

Performance Stress Testing (PST)