D3. Test Plan

What we would do if we had all the time that we needed:

Usability Testing

  • We would give our excel input file to local business people (of differing technical knowledge) and make sure that they are able to follow the input structure with ease. In terms of the graph outputs on the UI, how intuitive is it for the average user?

Acceptance Testing

  • We would want to measure if our web application has a positive impact on sales after a certain amount of time being utilized. In terms of the graph outputs, do they actually help the user decide what changes they should make to sales strategies?

End to End Testing

  • We plan to use the Robot framework to verify the correctness of our web application from start to finish. 

Performance and Reliability Testing

  • We are going to check the run time of our application to ensure that it is executed in a reasonable amount of time for different input sizes using the embedded system time commands. This is essential as our product will need to be used by companies with variable sales development cycles and amount of historical data.

What we are actually going to do:

Unit Testing

  • We will use the Python unittest library to create multiple input files for testing that contain different stages, new opportunity sources, and their corresponding statistics (probabilities, means, standard deviations).
  • We will then run the simulation for a set number of weeks and verify that the results match our calculated output from the original excel simulation. In order to fix the randomness of the normal distribution for incoming new opportunities, we will need to mock the normal distribution output using the mock library (unittest.mock) in Python and fix the random numbers in the excel. 
  • The tests will cover different scenarios, such as minimum input values, multiple weeks, and multiple sources. The tests will ensure that the simulation produces the expected output for each of these scenarios.

Integration and System Testing

  • We need to ensure that uploading a file will correctly parse and store the required variables for the simulation. It should format the data in a JSON that will be readable by our AWS lambda function.
  • We need to ensure if the input file is not in the correct format, the AWS Lambda function would not be triggered.
  • Test the DragDropFile component to ensure it renders without crashing.
  • Test the Sliders component to ensure it renders properly.
  • Test the ScenerioSlider component to verify that it renders without crashing and displays the name of the slider correctly.
  • Test the ScenerioSlider component to ensure it updates the slider value and calls the onSliderChange callback function when the slider value changes.
  • Test the NavigationBar component to ensure it renders links to the home, help, and about pages correctly.
  • Test the ScoreboardBarChart component to verify that it renders the chart correctly with the provided data.
  • Test the SimulationBarChart component to ensure it renders the chart correctly with the provided data.
  • Test the UploadModule component within the ControlPanelModule to verify that it renders properly and updates the selectedTimePeriod state when the option is changed.
  • Test the NewOpsModule component to ensure it renders properly and displays the scenario analysis title.
  • Test the Scoreboard component to verify that it renders the title correctly and does not render the chart when there is no data.
  • Test the SimulationModule component to ensure it renders correctly.

Tools that we are going to use:

  • unittest: unit test is a popular testing library for Python programming language. It is used to write and run tests for Python code, and it provides a simple and intuitive way to create test cases and fixtures.
  • Jest: Jest is a popular JavaScript testing framework developed by Facebook. It provides an easy-to-use API, fast test execution, built-in mocking capabilities, and powerful assertion functions. Jest supports different types of tests, integrates with popular JavaScript frameworks, and simplifies asynchronous testing. It is widely adopted for its simplicity and efficiency in testing JavaScript codebases.