Sobes.tech
Senior

Test design task: test a console application that takes three integers (triangle sides) and outputs the triangle type (scalene, isosceles, equilateral) or an error.

sobes.tech AI

Answer from AI

To test a console application that accepts three integers (sides of a triangle) and returns the type of triangle or an error, the following test design approaches can be applied:

  1. Positive tests:

    • Equilateral triangle: all three sides are equal (e.g., 5, 5, 5).
    • Isosceles triangle: two sides are equal, the third is different (e.g., 5, 5, 3).
    • Scalene triangle: all sides are different but satisfy the triangle inequality (e.g., 3, 4, 5).
  2. Negative tests:

    • Sides do not form a triangle (e.g., 1, 2, 10).
    • Zero or negative values (e.g., 0, 5, 5 or -1, 4, 5).
    • Non-integer or non-numeric inputs (e.g., "a", 3, 4).
  3. Boundary values:

    • Minimum allowable sides (e.g., 1, 1, 1).
    • Very large numbers to test handling of large values.
  4. Special cases:

    • All sides are zero.
    • Two zeros and one positive side.

This approach will cover main scenarios and help identify errors in the logic of determining the triangle type and input validation.

Test design task: test a console application that… - sobes.tech