2

Let us assume we have 3 students in a class who have secured the below marks.

===============================================
|      | Maths  | English  | Science  | Rank  |
|----------------------------------------------
|Mark  |   60   |    40    |    80    |   2   |
|----------------------------------------------
|John  |   40   |    30    |    50    |   3   |
|----------------------------------------------
|Alice |   60   |    60    |    70    |   1   |
===============================================

Normally the rank is decided by adding all three marks. Looking at the above table, the rank sequence would be Alice, Mark, John.

If there exists a system that takes student marks as input and lists the student names based on their rank, then how do I test such system whether it returns correct student list or not for all possible data set?

What should be the approach to test such a system? Generating all possible combinations of data would be exhaustive when the number of students and subjects increase.

2
  • 1
    this looks like an exam or interview question to me.
    – Amias
    Commented Dec 27, 2018 at 12:54
  • Yes, this could be an interview question as well. Am trying to solve a real use case but modelled the problem to students and marks just for easier explanation and understanding.
    – Shamanth
    Commented Dec 28, 2018 at 5:54

3 Answers 3

2

What should be the approach to test such a system? Generating all possible combinations of data would be exhaustive when the number of students and subjects increase.

You are looking for Equivalence Partitioning Testing - determine representatives entries of infinity sets and test using this non-infinity set of test cases.

For the example above, you can try cross-space testing between a number of students and number of marks:

  • 0 students | 0 marks
  • 1 student | 1 mark
  • 2 students | 2 marks
  • a few students | a few marks
  • many students | many marks
  • too many students | too many marks (trying to create an overflow)

6 partitions of numbers of students * 6 partitions of numbers of mark = 36 test cases.

2
  • Thanks for the answer. I will explore a bit and get back.
    – Shamanth
    Commented Dec 28, 2018 at 5:55
  • You are welcome - if you found the answer satisfactory, could you mark it as accepted? Commented Jan 8, 2019 at 19:44
0

I am quoting myself on an earlier question... how to identify test-cases

There is much information to be found about these problems.

There are tools to generate combinations based on possible inputs, they try to help you to limit the total number but keep a representative 'coverage'. See here: http://www.pairwise.org/ for more information. I have used PICT and Hexawise in the past to generate combinational choices for testing.

If you want to dive deeper into this field, Cem Kaner has published a book about it: The Domain Testing Workbook

Whether it is "enough" is always a choice :-)

0

For testing any application we need to have good and effective testcases. Writing effective test cases covering all the scenarios depicts how efficient a qa services company is.

I would like to prefer you to use the Equivalence and Boundary testing approach.

Below steps can also be followed that can be beneficial to test such application.

  1. Verify that all the subject fields should accepts valid input.
  2. Verify that total marks should be calculated correctly or not.
  3. Verify that whether Rank is calculated correctly or not.
  4. Verify or confirm the Rank output for the student having same total marks. 5

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.