[SOLVED] CSE308-Assignment 5 Writing Test Scripts

30.00 $

Category:

Description

5/5 - (1 vote)

Write a function that takes several numbers in any list data structure, sorts them in ascending order and returns the sorted list. You are to do unit test by writing a test driver using any programming language. Use of any unit testing tool or framework will be appreciated.

Test outcome will be successful by checking the following:

  1. i) Test whether the list of the numbers are not altered by the testing routine ii) Test whether sorting is done in the correct order

 

You have to write the test script for generating the following categories of test data:

  1. i) Sorting a blank list ii) Sorting just one number iii) Sorting two numbers
  2. The size of the list is initialized randomly
  3. The numbers in the list is initialized randomly vi) The numbers in the is sorted in ascending order vii)            The numbers in the is sorted in descending order viii)       All the numbers in the list are equal

 

You will get bonus mark if you can add more test cases in addition to the abovementioned ones.