Skip to content

Session 10

Test cases and test report for the matrix transpose web page

Updated View as Markdown

This session produces the test cases for the transpose page built in Session 9 and the test report written after running them. Web page testing differs from the C program testing in Session 8: there is no exit code, the input is clicks and keystrokes, and the output is what appears on screen. The cases therefore describe exact screen actions and exact page text. The report at the end is the document a project manager reads; the test case table is what the tester works from.

Objectives

Do not copy. Read for understanding and the viva
  • Write test cases for a browser page in terms of user actions and visible results
  • Group cases into functional, validation, boundary, and usability categories
  • Execute every case in a named browser and record the actual result
  • Write a test report with environment, summary counts, defects with severity, and a conclusion

Problem Statement

Write in lab record

Develop test cases for the web pages of 9(a). Then, develop test report after testing using the test cases developed.

Concept

Do not copy. Read for understanding and the viva

Four categories

Functional cases check that the page does what the manual asks: two text boxes, Input Elements builds the grid, Compute Transpose shows the transpose. Validation cases feed bad input at each stage and expect a clear message and no wrong output. Boundary cases sit on the edges of the allowed range: 1 x 1, 10 x 10, 0, 11. Usability cases check things the manual implies but does not say: labels match, errors are readable, a second run does not leave rubbish from the first.

Precondition for a web test

For a page, the precondition is the screen state before the action: “page freshly loaded” or “2 x 3 grid shown with all boxes filled”. Writing it down stops two testers from getting different results because one had leftovers from a previous case.

Expected output for a page

Say what the user sees, in words a second person can check: the text of the message, the number of boxes, the size and contents of the result table. “Works correctly” is not an expected output.

Severity scale

Use one scale for the whole record. Critical: wrong output or crash on normal input. High: a required feature missing or unusable. Medium: wrong behaviour on unusual but plausible input. Low: cosmetic, or wrong only on input no user would give. Note: an observation with no defect. Every defect in the report carries one of these words, so two readers rate the same defect the same way.

The test report

The report is separate from the case table. It records the environment (browser and version, operating system, date), the counts (total, passed, failed, blocked), the defects with severity, and a one-paragraph conclusion on whether the page is fit to submit. Blocked means the case could not be run, for instance because an earlier failure prevented reaching the state it needs.

Test Cases

Write in lab record

Page under test: transpose.html from Session 9, opened directly from disk in the browser. Every case starts from a freshly loaded page unless the precondition says otherwise.

TC idFeaturePreconditionInputExpected outputActual outputStatus
WT-01Functional: initial screenpage loadednoneTwo number boxes labelled Rows and Columns and one button labelled Input Elements; no grid; no resultAs expectedPass
WT-02Functional: grid generationpage loadedRows 2, Columns 3, click Input ElementsHeading “Enter 2 x 3 elements”, 6 boxes in 2 rows of 3, button Compute Transpose belowHeading, 2 x 3 grid and button shownPass
WT-03Functional: transpose of rectangular matrix2 x 3 grid shownfill 1 2 3 / 4 5 6, click Compute TransposeHeading “Transpose (3 x 2)” and table 1 4 / 2 5 / 3 6Transpose (3 x 2): 1 4 / 2 5 / 3 6Pass
WT-04Functional: transpose of square matrix2 x 2 grid shownfill 1 2 / 3 4, click Compute TransposeTranspose (2 x 2): 1 3 / 2 41 3 / 2 4Pass
WT-05Functional: column vector3 x 1 grid shownfill 7 / 8 / 9, click Compute TransposeTranspose (1 x 3): single row 7 8 97 8 9 in one rowPass
WT-06Functional: negative and decimal elements1 x 2 grid shownfill -3 and 2.5, click Compute TransposeTranspose (2 x 1): -3 / 2.5-3 / 2.5Pass
WT-07Functional: repeat with new dimensionsWT-03 completedchange Rows to 1, Columns to 1, click Input ElementsOld grid and old result removed; single box and Compute Transpose shownOld grid and result cleared, 1 x 1 grid shownPass
WT-08Validation: blank dimensionspage loadedclick Input Elements with both boxes emptyError “Rows and columns must be whole numbers from 1 to 10.”; no gridError shown, no gridPass
WT-09Validation: zero rowspage loadedRows 0, Columns 3, click Input ElementsSame error; no gridError shown, no gridPass
WT-10Validation: decimal dimensionpage loadedRows 2.5, Columns 2, click Input ElementsSame error; no gridError shown, no gridPass
WT-11Validation: negative dimensionpage loadedRows -1, Columns 2, click Input ElementsSame error; no gridError shown, no gridPass
WT-12Validation: letters in dimensionpage loadedtype abc in Rows, Columns 2, click Input ElementsSame error; no gridBrowser number box does not accept letters; value stays empty; error shownPass
WT-13Validation: blank element2 x 2 grid shownleave box (1,2) empty, fill others, click Compute TransposeError “Element (1,2) must be a number.”; no result tableError shown, no resultPass
WT-14Validation: element error clears on retryWT-13 statefill box (1,2) with 9, click Compute TransposeError text removed; transpose shownError cleared, result shownPass
WT-15Boundary: 1 x 1page loadedRows 1, Columns 1, Input Elements, fill 5, Compute TransposeTranspose (1 x 1): 55Pass
WT-16Boundary: 10 x 10page loadedRows 10, Columns 10, click Input Elements100 boxes in 10 rows; page still usable100 boxes shown; grid fits within the page widthPass
WT-17Boundary: 11 rowspage loadedRows 11, Columns 1, click Input ElementsError; no gridError shown, no gridPass
WT-18Boundary: 1 x 10page loadedRows 1, Columns 10, Input Elements, fill 1 to 10, Compute TransposeTranspose (10 x 1): 1 to 10 in one columnTen rows, 1 to 10Pass
WT-19Usability: button labelspage loadedread the pageButtons read exactly Input Elements and Compute TransposeLabels match the manualPass
WT-20Usability: error visibilityWT-08 stateread the pageError is red text under the button, not an alert boxRed text under the buttonPass
WT-21Usability: keyboard entry2 x 2 grid shownTab between boxes and type valuesTab moves left to right, top to bottom, then to the buttonTab order follows reading orderPass
WT-22Usability: dimension change without clicking Input Elements2 x 3 grid filledchange Rows to 3 without clicking Input Elements, click Compute TransposeTranspose still computed for the 2 x 3 grid that is on screenTranspose (3 x 2) shown, matching the visible gridPass
WT-23Usability: no page reload2 x 3 grid filledclick Compute TransposePage does not reload; typed values remain in the gridValues remain, no reloadPass
WT-24Validation: very large element1 x 1 grid shownfill 99999999999999999999, click Compute TransposeValue displayed as enteredDisplayed as 100000000000000000000Fail (WD-01)

Test Report

Write in lab record

Test environment

ItemValue
Page under testtranspose.html (Session 9), opened from local disk
BrowserGoogle Chrome 130, default settings, JavaScript enabled
Operating systemmacOS 15
Testerstudent name and enrolment number
Date2026-09-26
Test dataas listed in the Input column of each case

Summary

CategoryTotalPassedFailedBlocked
Functional7700
Validation8710
Boundary4400
Usability5500
All242310

Pass rate: 96 percent. No case was blocked; every case reached the state its precondition needed.

Defects found

Defect idFound byDescriptionSeverityCauseSuggested fixStatus
WD-01WT-24A 20-digit element is displayed as 100000000000000000000, not the digits typed.LowNumber(v) converts the text to a floating-point value, which cannot hold 20 significant digits exactly.Keep the element as the trimmed string for display and only use Number for the validity check.Open
WD-02WT-12 (observation)Letters cannot be typed into the dimension boxes because they are type="number", so the letters case is handled by the browser, not by the page script.NoteNative number input behaviour.None needed; record that the validation regular expression still guards paste and non-standard browsers.Closed

Conclusion

The page meets the problem statement: two text boxes, a button labelled Input Elements that generates the element boxes, and a button labelled Compute Transpose that displays the transpose. All functional, boundary, and usability cases passed. The one failure, WD-01, concerns a 20-digit element outside any realistic use of the page and is rated low; it does not affect the transpose logic. The page is fit for submission with WD-01 recorded as a known limitation.

Viva Questions

Do not copy. Read for understanding and the viva
  • Q: How does testing a web page differ from testing the C program? A: Input is user actions, output is screen text, and there is no exit code; the expected output must describe what the user sees.
  • Q: What does “blocked” mean in the summary? A: The case could not be executed, usually because a prerequisite state could not be reached.
  • Q: Why is WT-22 a usability case and not a validation case? A: The input is valid; the question is whether the page behaves sensibly when the user changes a box without clicking the button.
  • Q: Why does WT-12 pass even though the page script never saw the letters? A: The expected output was “error and no grid”, and that is what happened; the report notes which layer enforced it.
  • Q: Why is WD-01 low severity? A: It needs a 20-digit input, produces a visibly rounded number, and does not affect the transpose of ordinary values.
  • Q: Why is the test environment recorded? A: A different browser or version can behave differently; the report must say where the results hold.
  • Q: What is the difference between the test case table and the test report? A: The table is the tester’s working document; the report summarises results, defects, and a fitness decision for the reader.
  • Q: What would a 100 percent pass rate on the first run suggest? A: That the cases were not hard enough; every table should include cases designed to break the page.

Common Mistakes

Do not copy. Read for understanding and the viva
  • Writing “works” or “displays correctly” as expected output. Name the text and the numbers.
  • Skipping the precondition, so a case that relies on a grid from an earlier case cannot be repeated on its own.
  • Testing only 2 x 2 and 3 x 3. The 1 x 1, 1 x 10, 10 x 10, 0, and 11 cases are the ones that find bugs.
  • Leaving the browser name and date out of the report.
  • Reporting a defect without a severity, or giving every defect the same severity.
  • Not retesting after clearing an error (WT-14). A page that shows an error and never recovers is a defect.

Session Summary

Write in lab record
  • Test case table with 24 cases across functional, validation, boundary, and usability
  • Test environment table
  • Summary table with total, passed, failed, blocked per category
  • Defect table with WD-01 and WD-02, each with severity and suggested fix
  • Conclusion stating whether the page is fit to submit
Navigation

Type to search…

↑↓ navigate↵ selectEsc close