Skip to content

Test cases

Aleksandr Nedorezov edited this page Jul 25, 2017 · 20 revisions

This page contains step-by-step descriptions of tests that check systems performance and compliance to the requirements.

Test cases include:

Case 1: Labelling Process
Case 2: Automated saving of results (Case 1 without clicking on save button)
Case 3: Polygons selection and modification of classes and parameters of the selected polygon
Case 4: Undoing points addition during objects markup
Case 5: Redoing the addition of the cancelled point from the objects markup
Case 6: Deletion of selected polygons
Case 7: Cancelling the markup of the current object
Case 8: Image brightness increase on clicking btn_brightness_high button
Case 9: Image brightness decrease on clicking btn_brightness_low button
Case 10: Image scaling
Case 11: History
Case 12: Switching between languages
Case 13: Minimap interaction

Case 1

Labeling Process

  1. Polygon tool is selected by default
  2. Label {(100, 100), (100, 200), (200, 100)} polygon.
    1.1. left click on the 100, 100 pixel of the image
    1.2. left click on the 100, 200 pixel of the image
    1.3. left click on the 200, 100 pixel of the image
    1.4. left click on the 100, 100 pixel of the image
  3. Select object class “class 0”
  4. Check “is occluded” boolean parameter
  5. Click save button
  6. Compare returned JSON markup to [{\"points\":[[100,100],[100,200],[200,100]],\"parameters\":{\"class\":\"class 0\",\"is occluded\":true}}]

Case 2

Automated saving of results (Case 1 without clicking on save button)

  1. Polygon tool is selected by default
  2. Label {(100, 100), (100, 200), (200, 100)} polygon.
    1.1. left click on the 100, 100 pixel of the image
    1.2. left click on the 100, 200 pixel of the image
    1.3. left click on the 200, 100 pixel of the image
    1.4. left click on the 100, 100 pixel of the image
  3. Select object class “class 0”
  4. Check “is occluded” boolean parameter
  5. Compare returned JSON markup to [{\"points\":[[100,100],[100,200],[200,100]],\"parameters\":{\"class\":\"class 0\",\"is occluded\":true}}]

Case 3

Polygons selection and modification of classes and parameters of the selected polygon

  1. Polygon tool is selected by default
  2. Label {(100, 100), (100, 200), (200, 100)} polygon.
    1.1. left click on the 100, 100 pixel of the image
    1.2. left click on the 100, 200 pixel of the image
    1.3. left click on the 200, 100 pixel of the image
    1.4. left click on the 100, 100 pixel of the image
  3. Select object class “class 0”
  4. Check “is occluded” boolean parameter
  5. Label {(300, 300), (300, 400), (400, 300)} polygon.
    4.1. left click on the 300, 300 pixel of the image
    4.2. left click on the 300, 400 pixel of the image
    4.3. left click on the 400, 300 pixel of the image
    4.4. left click on the 300, 300 pixel of the image
  6. Select object class “class 1”
  7. Make sure “is occluded” boolean parameter is NOT checked
  8. - // Removed in the releases after 1.4
  9. Left click on the image on (120, 120) point
  10. Uncheck “is occluded” boolean parameter
  11. Left click on the image on (320, 320) point
  12. Change object class selection from ”class 1” to “class 0”
  13. Check “is occluded” boolean parameter
  14. Click save button
  15. Compare returned JSON markup to [{\"points\":[[100,100],[100,200],[200,100]],\"parameters\":{\"class\":\"class 0\",\"is occluded\":false}}, {\"points\":[[300,300],[300,400],[400,300]],\"parameters\":{\"class\":\"class 0\",\"is occluded\":true}}]

Case 4

Undoing points addition during objects markup

  1. Polygon tool is selected by default
  2. Label {(100, 100), (100, 200), (200, 100), (200, 200), (150, 150)} points.
    1.1. left click on the 100, 100 pixel of the image
    1.2. left click on the 100, 200 pixel of the image
    1.3. left click on the 200, 100 pixel of the image
    1.4. left click on the 200, 200 pixel of the image
    1.5. left click on the 150, 150 pixel of the image
  3. Click [ctrl] + [z] // Undo addition of the latest point
  4. Click [ctrl] + [z] // Undo addition of the latest point
  5. left click on the 100, 100 pixel of the image
  6. Click save button
  7. Compare returned JSON markup to [{\"points\":[[100,100],[100,200],[200,100]],\"parameters\":{}}]

Case 5

Redoing the addition of the cancelled point from the objects markup

  1. Polygon tool is selected by default
  2. Label {(100, 100), (100, 200), (200, 100), (200, 200), (150, 150)} points.
    1.1. left click on the 100, 100 pixel of the image
    1.2. left click on the 100, 200 pixel of the image
    1.3. left click on the 200, 100 pixel of the image
    1.4. left click on the 200, 200 pixel of the image
    1.5. left click on the 150, 150 pixel of the image
  3. Click [Ctrl] + [z] // Undo addition of the latest point
  4. Click [Ctrl] + [z] // Undo addition of the latest point
  5. Click [Ctrl] + [Shift] + [z] // Redo the addition of the latest cancelled point
  6. left click on the 100, 100 pixel of the image
  7. Click save button
  8. Compare returned JSON markup to [{\"points\":[[100,100],[100,200],[200,100],[200,200]],\"parameters\":{}}]

Case 6

Deletion of selected polygons

  1. Polygon tool is selected by default
  2. Label {(100, 100), (100, 200), (200, 100)} polygon.
    1.1. left click on the 100, 100 pixel of the image
    1.2. left click on the 100, 200 pixel of the image
    1.3. left click on the 200, 100 pixel of the image
    1.4. left click on the 100, 100 pixel of the image
  3. Select object class “class 0”
  4. Check “is occluded” boolean parameter
  5. Label {(300, 300), (300, 400), (400, 300)} polygon.
    4.1. left click on the 300, 300 pixel of the image
    4.2. left click on the 300, 400 pixel of the image
    4.3. left click on the 400, 300 pixel of the image
    4.4. left click on the 300, 300 pixel of the image
  6. Select object class “class 1”
  7. Make sure “is occluded” boolean parameter is NOT checked
  8. Label {(50, 50), (50, 75), (75, 50)} polygon.
    7.1. left click on the 50, 50 pixel of the image
    7.2. left click on the 50, 75 pixel of the image
    7.3. left click on the 75, 50 pixel of the image
    7.4. left click on the 50, 50 pixel of the image
  9. Select object class “class 1”
  10. Check “is occluded” boolean parameter
  11. - // Removed in the releases after 1.4
  12. Left click on the image on (320, 320) point
  13. Click [Delete] button
  14. Left click on the image on (55, 55) point
  15. Click [Backspace] button
  16. Click save button
  17. Compare returned JSON markup to [{\"points\":[[100,100],[100,200],[200,100]],\"parameters\":{\"class\":\"class 0\",\"is occluded\":true}}]

Case 7

Cancelling the markup of the current object

  1. Polygon tool is selected by default
  2. Label {(100, 100), (100, 200), (200, 100)} polygon.
    1.1. left click on the 100, 100 pixel of the image
    1.2. left click on the 100, 200 pixel of the image
    1.3. left click on the 200, 100 pixel of the image
    1.4. left click on the 100, 100 pixel of the image
  3. Label {(300, 300), (300, 400), (400, 300)} points.
    2.1. left click on the 300, 300 pixel of the image
    2.2. left click on the 300, 400 pixel of the image
    2.3. left click on the 400, 300 pixel of the image
  4. Perform a right-click (right mouse click)
  5. Label {(50, 50), (50, 75), (75, 50)} polygon.
    7.1. left click on the 50, 50 pixel of the image
    7.2. left click on the 50, 75 pixel of the image
    7.3. left click on the 75, 50 pixel of the image
    7.4. left click on the 50, 50 pixel of the image
  6. Click save button
  7. Compare returned JSON markup to [{\"points\".[[100,100],[100,200],[200,100]],\"parameters\":{}},{\"points\":[[50,50],[50,75],[75,50]],\"parameters\":{}}]

Case 8

Image brightness increase on clicking btn_brightness_high button

  1. Measure initial brightness of the image and save it’s value
  2. Click brightness_high button
  3. Measure current brightness of the image once again and save it’s value
  4. Compare initial brightness value to the current one (check that current brightness value is higher than the initial one)

Case 9

Image brightness decrease on clicking btn_brightness_low button

  1. Measure initial brightness of the image and save it’s value
  2. Click brightness_low button
  3. Measure current brightness of the image once again and save it’s value
  4. Compare initial brightness value to the current one (check that current brightness value is lower than the initial one)

Case 10

Image scaling

  1. Polygon tool is selected by default
  2. Save width and height of #main-canvas and #svg_img blocks
  3. Label {(65, 65), (65, 85), (85, 85), (85, 65)}.
    2.1. left click on the 65, 65 pixel of the image
    2.2. left click on the 65, 85 pixel of the image
    2.3. left click on the 85, 85 pixel of the image
    2.4. left click on the 85, 65 pixel of the image
    2.5. left click on the 65, 65 pixel of the image
  4. Click btn_zoom_out button
  5. Check that current width and height of #main-canvas and #svg_img blocks are equal to their saved values
  6. Click btn_zoom_in button
  7. Check that current width and height of #main-canvas and #svg_img blocks are doubles of their saved values
  8. Label {(60, 60), (60, 90), (90, 90), (90, 60)} polygon.
    7.1. left click on the 120, 120 pixel of the image // as image is low scaled to 2x
    7.2. left click on the 120, 180 pixel of the image // as image is low scaled to 2x
    7.3. left click on the 180, 180 pixel of the image // as image is low scaled to 2x
    7.4. left click on the 180, 120 pixel of the image // as image is low scaled to 2x
    7.5. left click on the 120, 120 pixel of the image // as image is low scaled to 2x
  9. Click btn_zoom_in button
  10. Check that current width and height of #main-canvas and #svg_img blocks are equal to their saved values multiplied by 4
  11. Label {(55, 55), (55, 95), (95, 95), (95, 55)} polygon.
    10.1. left click on the 220, 220 pixel of the image // as image is low scaled to 4x
    10.2. left click on the 220, 380 pixel of the image // as image is low scaled to 4x
    10.3. left click on the 380, 380 pixel of the image // as image is low scaled to 4x
    10.4. left click on the 380, 220 pixel of the image // as image is low scaled to 4x
    10.5. left click on the 220, 220 pixel of the image // as image is low scaled to 4x
  12. Click btn_zoom_out button
  13. Check that current width and height of #main-canvas and #svg_img blocks are doubles of their saved values
  14. Label {(50, 50), (50, 100), (50, 100), (100, 50)} polygon.
    13.1. left click on the 100, 100 pixel of the image // as image is low scaled to 2x
    13.2. left click on the 100, 200 pixel of the image // as image is low scaled to 2x
    13.3. left click on the 200, 200 pixel of the image // as image is low scaled to 2x
    13.4. left click on the 200, 100 pixel of the image // as image is low scaled to 2x
    13.5. left click on the 100, 100 pixel of the image // as image is low scaled to 2x
  15. Click btn_zoom_out button
  16. Check that current width and height of #main-canvas and #svg_img blocks are equal to their saved values
  17. Click save button
  18. Compare returned JSON markup to [{\"points\":[[65,65],[65,85],[85,85],[85,65]],\"parameters\":{}},{\"points\":[[60,60],[60,90],[90,90],[90,60]],\"parameters\":{}},{\"points\":[[55,95],[55,95],[95,95],[95,55]],\"parameters\":{}},{\"points\":[[50,50],[50,100],[100,100],[100,50]],\"parameters\":{}}]

Case 11

History

  1. Polygon tool is selected by default
  2. Check that historyRow0 DOM element does not exist
  3. Label {(100, 100), (100, 200), (200, 100)} polygon.
    2.1. left click on the 100, 100 pixel of the image
    2.2. left click on the 100, 200 pixel of the image
    2.3. left click on the 200, 100 pixel of the image
    2.4. left click on the 100, 100 pixel of the image
  4. Check that historyRow0 DOM element exists and contains a string “Polygon was added and assigned an id 0”
  5. Select object class “class 0”
  6. Check that historyRow1 DOM element exists and contains a string “Class of polygon 0 was changed to class 0”
  7. Check “is occluded” boolean parameter
  8. Check that historyRow2 DOM element exists and contains a string “Parameter is occluded of polygon 0 was changed to true”
  9. Select “option 1 name” option of “select an option” select parameter
  10. Check that historyRow3 DOM element exists and contains a string “Parameter select an option of polygon 0 was changed to option 1 name”
  11. Label {(300, 300), (300, 400), (400, 300)} polygon.
    10.1. left click on the 300, 300 pixel of the image
    10.2. left click on the 300, 400 pixel of the image
    10.3. left click on the 400, 300 pixel of the image
    10.4. left click on the 300, 300 pixel of the image
  12. Check that historyRow4 DOM element exists and contains a string “Polygon was added and assigned an id 1”
  13. - // Removed in the releases after 1.4
  14. Left click on the image on (105, 120) point
  15. Click [Delete] button
  16. Check that historyRow5 DOM element exists and contains a string “Polygon with id 0 was deleted”
  17. Left click on the image on (305, 320) point
  18. Select object class “class 0”
  19. Check that historyRow6 DOM element exists and contains a string “Class of polygon 1 was changed to class 0”
  20. Compare returned JSON markup to [{\"points\":[[300,300],[300,400],[400,300]],\"parameters\":{\"class\":\"class 0\"}}]
  21. Click “Undo” button (#delete-row)
  22. Check that historyRow6 DOM element does not exist
  23. Compare returned JSON markup to [{\"points\":[[300,300],[300,400],[400,300]],\"parameters\":{}}]
  24. Click “Undo” button (#delete-row)
  25. Check that historyRow5 DOM element does not exist
  26. Compare returned JSON markup to [{\"points\":[[100,100],[100,200],[200,100]],\"parameters\":{\"class\":\"class 0\",\"is occluded\":true,\"select an option\":\"option 1 name\"}}, {\"points\":[[300,300],[300,400],[400,300]],\"parameters\":{}}]
  27. Click “Undo” button (#delete-row)
  28. Check that historyRow4 DOM element does not exist
  29. Compare returned JSON markup to [{\"points\":[[100,100],[100,200],[200,100]],\"parameters\":{\"class\":\"class 0\",\"is occluded\":true,\"select an option\":\"option 1 name\"}}]
  30. Click “Undo” button (#delete-row)
  31. Check that historyRow3 DOM element does not exist
  32. Compare returned JSON markup to [{\"points\":[[100,100],[100,200],[200,100]],\"parameters\":{\"class\":\"class 0\",\"is occluded\":true}}]
  33. Click “Redo” button (#add-row)
  34. Check that historyRow3 DOM element exists and contains a string “Parameter select an option of polygon 0 was changed to option 1 name”
  35. Compare returned JSON markup to [{\"points\":[[100,100],[100,200],[200,100]],\"parameters\":{\"class\":\"class 0\",\"is occluded\":true,\"select an option\":\"option 1 name\"}}]
  36. Click “Redo” button (#add-row)
  37. Check that historyRow4 DOM element exists and contains a string “Polygon was added and assigned an id 1”
  38. Compare returned JSON markup to [{\"points\":[[100,100],[100,200],[200,100]],\"parameters\":{\"class\":\"class 0\",\"is occluded\":true,\"select an option\":\"option 1 name\"}}, {\"points\":[[300,300],[300,400],[400,300]],\"parameters\":{}}]
  39. Click “Redo” button (#add-row)
  40. Check that historyRow5 DOM element exists and contains a string “Polygon with id 0 was deleted”
  41. Compare returned JSON markup to [{\"points\":[[300,300],[300,400],[400,300]],\"parameters\":{}}]
  42. Click “Redo” button (#add-row)
  43. Check that historyRow6 DOM element exists and contains a string “Class of polygon 1 was changed to class 0”
  44. Compare returned JSON markup to [{\"points\":[[300,300],[300,400],[400,300]],\"parameters\":{\"class\":\"class 0\"}}]
  45. Click “iconOnHistoryRow6” button (#iconOnHistoryRow6)
  46. Check that historyRow6 DOM element does not exist
  47. Check that historyRow5 DOM element exists and contains a string “Polygon with id 0 was deleted”
  48. Compare returned JSON markup to [{\"points\":[[300,300],[300,400],[400,300]],\"parameters\":{}}]
  49. Check that #delete-row DOM element does not contain class “disabled”
  50. Left click on the image on (305, 320) point
  51. Select object class “class 1”
  52. Check that historyRow6 DOM element exists and contains a string “Class of polygon 1 was changed to class 1”
  53. Compare returned JSON markup to [{\"points\":[[300,300],[300,400],[400,300]],\"parameters\":{\"class\":\"class 1\"}}]
  54. Check that #delete-row DOM element does contain class “disabled”
  55. Check that #add-row DOM element does not contain class “disabled”

Case 12

Switching between languages

  1. Polygon tool is selected by default
  2. Check that activeLanguage.getLanguageName() returns “english”
  3. Check that #message_space DOM element contains either a string returned by language.english().markupImageWithToolsNotificationString, or a string returned by language.english().notTheFullImageWillBeShownNotificationString
  4. Check that #label-parameters-block-title DOM element contains a string returned by language.english().labelParameters
  5. Check that #history-block-title DOM element contains a string returned by language.english().history
  6. Label {(100, 100), (100, 200), (200, 100)} polygon.
    5.1. left click on the 100, 100 pixel of the image
    5.2. left click on the 100, 200 pixel of the image
    5.3. left click on the 200, 100 pixel of the image
    5.4. left click on the 100, 100 pixel of the image
  7. Check that historyRow0 DOM element exists and contains a string returned by language.english().polygonWasAddedAndAssignedAnId
  8. Select "russian" option in #language-selection-select select
  9. Check that activeLanguage.getLanguageName() returns “russian”
  10. Check that #message_space DOM element contains either a string returned by language.russian().markupImageWithToolsNotificationString, or a string returned by language.russian().notTheFullImageWillBeShownNotificationString
  11. Check that #label-parameters-block-title DOM element contains a string returned by language.russian().labelParameters
  12. Check that #history-block-title DOM element contains a string returned by language.russian().history
  13. Check that historyRow0 DOM element exists and contains a string returned by language.russian().polygonWasAddedAndAssignedAnId
  14. Select "english" option in #language-selection-select select
  15. Check that activeLanguage.getLanguageName() returns “english”
  16. Check that #message_space DOM element contains either a string returned by language.english().markupImageWithToolsNotificationString, or a string returned by language.english().notTheFullImageWillBeShownNotificationString
  17. Check that #label-parameters-block-title DOM element contains a string returned by language.english().labelParameters
  18. Check that #history-block-title DOM element contains a string returned by language.english().history
  19. Check that historyRow0 DOM element exists and contains a string returned by language.english().polygonWasAddedAndAssignedAnId

Case 13

Minimap interaction

  1. Click zoom in to scale an image so even the small image is not able to fit the main canvas
  2. Find the current value of the main canvas scroll
  3. Click on the minimap
  4. Find a new value of main canvas scroll
  5. Check if scroll value has changed after click on the minimap