Software Engineering 2019 Makeup

6th semester

2019 Makeup

Q.no 3

ATM UML Diagrams

Q.no 5

Test case for a function that checks if a given parameter is prime or not:

Test Case ID:   PRIME_001

Test Case Summary:   Verify that the function correctly identifies whether a given parameter is prime or not.

Precondition:   The function for checking prime numbers is implemented and accessible.

Test Case Steps:

  1. Input:  Provide a positive integer number as input, e.g., n = 7.
  2. Action:  Execute the function to check if the input number is prime.
  3. Expected Result:  Verify that the function correctly identifies whether the input number is prime or not.

–   Execution Steps:

  1. Open the code editor and access the function for checking prime numbers.
  2. Input a positive integer value, e.g., n = 7.
  3. Execute the function and capture the result.
  4. Compare the result with the expected outcome.

Expected Result:

– For input n = 7, the expected result is true (since 7 is a prime number).

Pass Criteria:

– The function correctly identifies prime numbers, returning true for prime numbers and false for non-prime numbers.

– It handles positive integer inputs correctly and provides accurate prime number checks.

This test case ensures that the function accurately identifies prime numbers, meeting the expected result and adhering to preconditions.

Leave a Reply

Your email address will not be published. Required fields are marked *