Skip to content

6. Systemtestplan

NamidM edited this page May 20, 2021 · 47 revisions

Contents

1. Changelog

Version Date Author Comment
0.1 16.4.2021 Johannes Timter created
0.2 29.4.2021 Johannes Timter Added REST Test Cases

2. Scope

The STP (System Test Plan) specifies the test strategy and test planning. It references tests to be performed to verify the accordance of the demanded features given by the SRS (System Requirements Specification) to the implemented features. The document derived from the STP is the STR (System Test Report) where additionally the results are given.

3. Definitions

TC Testcase

TS Testsuite

GUI Graphical User Interface

4. Product Names and Attributes

5. Features

The following requirements must be verified, as long as they are not classified as “not to be tested”. This table shows the test coverage between functionality and test suites or test cases.

Requirement-ID Description Priority Testsuite ID
LF10: Graphical User Interface The GUI provides the user with information about the saved files and the ability to edit, delete, download or upload files with the GUI A TS-001
LF20: Upload files Upload local .aml files to the server. A TS-001
LF30: Conversion from XML to JSON Uploaded file is converted to a JSON format, so it can be saved in a MongoDB database. One JSON object contains the entire file content as a string. A TS-001
LF40: Search for files -Search for entries by by ID
-Filter files by different parameters, e.g. upload date
A TS-001
LF50: List all files All saved files are listed for the user. Displayed entries provide access to entry-specific functions listed below A TS-001
LF60: Download files Download a previously uploaded file through the browser. A TS-001
LF70: Edit files Uploaded files can be edited and saved within the browser A TS-001
LF80: Delete files Delete uploaded file from server through a confirmation dialog. A TS-001
LF90: Info Page The Info page lists and explains the functions of the web interface. A TS-001
LF100: Database Files are stored in a MongoDB A TS-001
LF110: REST API The User can access the following functions through a REST API: REST API A TS-002

6. Test Preparation and Execution Strategies

The organisation and preparation of tests will be based on application use cases. We will separate the two ways the user can interact with the application:

  • The Graphical User Interface can be accessed through one of the current popular web browsers and contains all functions documented in the SRS. For the management of AML files we provide the user with many functions such as upload, edit, search, download and deletion of uploaded files. Each of these functions needs to be tested by using equivalence classes that contain expected/valid and unexpected/invalid user input/behavior. In case of valid input we expect the GUI to perform the promised action and leave our database in a consistent state. In case of invalid input we expect the user to receive feedback based in his error.
  • The REST Api (as described in LF110) provides access to the most basic functions of our product through the classic REST calls GET, POST, PUT, and DELETE. We need to ensure execution of the functions in case of valid input, and at least the return of the correct HTTP-code in case of invalid user input or a backend error.

Since none of the GUI tests interact or block each other, the GUI tests can be executed in an order of choice. The REST API tests should be executed in order as documented, as previously uploaded files are used in subsequent steps.

7. Test Equipment

The following equipment is required to execute the tests:

  • A PC with Windows 7 or higher
  • Installed AutomationML Editor (Download)
  • Internet Access and a current version of Google Chrome, Mozilla Firefox or Microsoft Edge
  • To test the REST API, the program Postman is required. (Download)

8. Test Schedule and Planning

Task Date Estimated Time Author Technical Support
Systemtestplan (STP) 16.4.2021 8 hours Johannes Timter -
Module tests (Testssuites) 17.4.2021 5 hours Johannes Timter -
      Graphical User Interface 17.4.2021 4 hours Johannes Timter Nils-Christopher Wiesenauer
      REST API 17.4.2021 1 hours Johannes Timter Namid-Fero Marxen
Systemtestreport (STP) 25.4.2021 8 hours Johannes Timter -

Deadline for the project is at the end of May 2021. By finishing our Systemtestreport by the end of April we still have an entire Month of time to refactor and correct any detected errors. For the execution of the tests the test-manager will be supported by the system-architect and the product manager.

Testsuite Test objective Testplan Creator Testplan Reviewer Test executor Testreport Creator
TS.GUI Graphical User Interface Johannes Timter Nils-Christopher Wiesenauer Johannes Timter, Nils-Christopher Wiesenauer Johannes Timter
TS.REST REST API Johannes Timter Nils-Christopher Wiesenauer Johannes Timter, Namid-Fero Marxen Johannes Timter

9. Testcases

Testsuite <TS.GUI>: Graphical User Interface> (#TS-001)

Testcase <TC.GUI.001.F> (Installation and Setup)

Testcase ID: TC.GUI.001.F
Testcase Name: Installation and Setup
Requirement ID(s): LF10, LF50
Description: The test case verifies that the GUI displays basic information about the uploaded aml files and offers the user access to the basic functions for aml files

Test Steps:

Step Action Expected Result
1 Install the AML NoSQL Database Manangement on your local machine. Use npm install to start installing the frontend and backend components. Use npm start on the backend and frontend component to start them. Open the GUI by using your preferred browser to open localhost:4200 Installation and Startup finishes successully. The login page is displayed.
2 Enter Username "Username" and Username "Password" Password. Press login. You are redirected to the main page
3 Click on the user icon on the right side of the navbar and verify that you are logged as LMF A popup appears, stating that you're logged in as "LMF", as well as a Logout button

Testdata: none

Testcase <TC.GUI.002.F> (File upload)

Testcase ID: TC.GUI.002.F
Testcase Name: File upload with valid file
Requirement ID(s): LF10, LF20
Description: The test case verifies that the system allows the user to upload .aml and .xml files to the database

Test Steps:

Step Action Expected Result
1 Go to the homepage and click the "Upload" button on the top right side. "Upload file" dialogue window opens
2 Use the "Datei auswählen" button to open the file selection dialogue. File selection dialogue window opens
3 Here, select an .aml or .xml file and click "open". The file is selected in the file selection dialogue
4 Confirm the upload by clicking the upload button Snackbar shows message "File was uploaded successfully"
5 Take a look at the displayed files that are listed in the table Every uploaded file is displayed in the table. The following information is displayed about each entry/file in the table: ID, Filename, Filesize in bytes, Upload Data.
6 Take a look at the right edge of an entry in the file table The following buttons should be available to click: Edit, Download, Delete. On hovering over the buttons, a tooltip should show up

Testdata: testdata_for_TC.GUI.002.F.zip

Dataset File is Valid expected Result
1 Balluff_ProductLibrary_CAEX3_221020.aml valid "Upload Successfull" snackbar shows up, and the file is displayed in the table.
2 03_Verzweigungen_Schleifen.pdf invalid "Upload Failed" snackbar shows up, the file doesn't show up in the table.

Testcase <TC.GUI.003.F> (Search for files)

Testcase ID: TC.GUI.003.F
Testcase Name: Search for files
Requirement ID(s): LF10, LF40
Description: The test case verifies that the system allows the user to search for uploaded files using the name

Test Steps:

Step Action Expected Result
1 Additionally to the Balluff_ProductLibrary_CAEX3_221020.aml file from last test case, upload the .aml file in the following file: TINF19C_AML_Library.zip File is uploaded successfully
2 Use the "Filter" text field on the top left side of the home screen and enter the given search term Results are filtered according to the searchterm

Testdata:

Dataset Searchterm is Valid
1 Library valid, 2 results
2 TINF19C_AML_Library.a valid, 1 results
3 adasdasdas dqwqwdqwd qwdqw valid, 0 results
4 Balluff_ProductLibrary_CAEX3_221020.aml valid, 1 results
5 <empty String> valid, 2 results

Testcase <TC.GUI.004.F> (Download files)

Testcase ID: TC.GUI.004.F
Testcase Name: Download files
Requirement ID(s): LF10, LF50, LF60
Description: The test case verifies that the system allows the user to download files

Test Steps:

Step Action Expected Result
1 In the table, look for the following file: "TINF19C_AML_Library.aml" Expected File is displayed in table
2 Click the "Download" icon on the right side of the file entry The file download starts through the browser
3 Wait for the download to finish The file is downloaded through the browser.

Testdata:

Dataset File is Valid
1 Balluff_ProductLibrary_CAEX3_221020.aml valid

Testcase <TC.GUI.005.F> (Edit saved file)

Testcase ID: TC.GUI.005.F
Testcase Name: Edit saved file
Requirement ID(s): LF10, LF50, LF70
Description: The test case verifies that the system allows the user to edit files

Test Steps:

Step Action Expected Result
1 Click the "Edit" icon on the right side of a file entry The "Edit file" dialogue opens.
2 Click on the "Name" field and change the name of the file Filename changes within the "Edit file" dialogue
3 Click on the "content" field and change the content of the file The file content changes within the "Edit file" dialogue
4 Click on the "Upload" button in the bottom right corner The changes are uploaded to the database. "File was uploaded successfully" snackbar appears briefly
5 Open the edited file again in an edit window The changes that have been applied can be observed
6 Repeat steps 1-3 -
7 Click on the "Cancel" button in the bottom right corner The "Edit file" dialogue closes and no changes are commited to the database
8 Open the edited file again in an edit window Confirm that the changes have not been applied

Testdata:

Dataset File is Valid
1 Balluff_ProductLibrary_CAEX3_221020.aml valid

Testcase <TC.GUI.006.F> (Delete files)

Testcase ID: TC.GUI.006.F
Testcase Name: Delete files
Requirement ID(s): LF10, LF50, LF80
Description: The test case verifies that the system allows the user to delete uploaded files

Test Steps:

Step Action Expected Result
1 Select one of the previously uploaded files in the table. If no file is currently uploaded, upload one of these testfiles. The file is uploaded and displayed within the table
2 Click on the "Delete" icon of the file Confirmation popup appears
3 Click on the "ok" button in the confirmation dialogue File is deleted from the database. File disappears from the table. Popup with "File deleted successfully" appears briefly

Testdata:

Dataset File is Valid
1 Balluff_ProductLibrary_CAEX3_221020.aml valid

Testcase <TC.GUI.007.F> (Info page)

Testcase ID: TC.GUI.007.F
Testcase Name: Info page
Requirement ID(s): LF10, LF50, LF90
Description: The test case verifies that info page display a short tutorial for the user

Test Steps:

Step Action Expected Result
1 In the navigation bar, click in the "i" Icon The "Info und Tutorial" page is displayed. You can see basis instructions on how to use the AML NoSQL Database Manangement site

Testdata: none

Testcase <TC.GUI.008.F> (File Roundtrip)

Testcase ID: TC.GUI.008.F
Testcase Name: File Roundtrip
Requirement ID(s): LF10, LF20, LF60, LF100
Description: The test case verifies that a valid .aml file survives the roundtrip through the system (upload and download) and continues to be valid.

Test Steps:

Step Action Expected Result
1 Open the AutomationMLEditor and import your .aml file verify the files validity The file is valid
2 Open the AML Database management site and upload your file as explained in TC.GUI.005.F The upload is successfull
3 Download the file that has just been uploaded, by clicking on the download icon on the respective file The download is successfull
4 Open the AutomationMLEditor and import the downloaded vile. Verify the file validity again The file is valid

Testdata:

Dataset File is Valid
1 Balluff_ProductLibrary_CAEX3_221020.aml valid

Testsuite <TS.REST>: REST API> (#TS-002)

Testcase <TC.REST.001.F> (GET calls)

Testcase ID: TC.REST.001.F
Testcase Name: GET calls
Requirement ID(s): LF110, LF100, LF30
Description: The test case verifies that the REST API GET calls work as documented in the SRS

Test Steps:

Step Action Expected Result
1 Use the GUI to upload two files Two files are uploaded and visible in the table in the home page
2 Open Postman and send the following GET request: localhost:3000/file The two files that are present in the database are returned in the format as seen below, along with HTTP-Code 200.
3 Send the following GET request: localhost:3000/file/{mongoDBID}, where {mongoDBID} is the _id attribute of the first file that has been received in step 2 Verify that only the first uploaded file is returned in the format below, along with HTTP-Code 200.
{
"status": "success",
    "data": {
        "name": "TINF19C_AML_Library.aml",
        "content":  string
    }
}

Testcase <TC.REST.002.F> (POST call)

Testcase ID: TC.REST.002.F
Testcase Name: POST call
Requirement ID(s): LF110, LF100, LF30
Description: The test case verifies that the REST API POST call works as documented in the SRS

Test Steps:

Step Action Expected Result
1 Open Postman and send the following POST request: localhost:3000/file and use the Testdata below as body Verify that you receive a JSON response containing "status": "success", as well as the just object that hast just been added
2 Send the following GET request: localhost:3000/file Verify that the file is now present in the database

Testdata:

{
    "file": {
    "base64": "data:application/xml;base64,ZnVlciBiYWxsdWY=",
    "name": "test-file.xml",
    "size": 560,
    "type": "text/xml"
    }
}

Testcase <TC.REST.003.F> (DELETE call)

Testcase ID: TC.REST.003.F
Testcase Name: DELETE call
Requirement ID(s): LF110, LF100, LF30
Description: The test case verifies that the REST API DELETE call works as documented in the SRS

Test Steps:

Step Action Expected Result
1 Use the GUI to upload two files Two files are uploaded and visible in the table in the home page
2 Open Postman and send the following GET request: localhost:3000/file. Remember the _id attribute of one of the files One of the _id attributes is remembered.
3 Send the following DELETE request: localhost:3000/file/{mongoDBID}, where {mongoDBID} is the _id attribute of the first file that has been received in step 2. You receive "status": "success" as well as the a response in the format below, along with HTTP-Code 200.
2 Send the following GET request: localhost:3000/file Verify only the not deleted file is not returned anymore, along with HTTP-Code 200.
{
    "status": "success",
    "data": {
        "n": 1,
        "ok": 1,
        "deletedCount": 1
    }
}

Testcase <TC.REST.004.F> (PUT call)

Testcase ID: TC.REST.004.F
Testcase Name: PUT call
Requirement ID(s): LF110, LF100, LF30
Description: The test case verifies that the REST API PUT call works as documented in the SRS

Test Steps:

Step Action Expected Result
1 Open Postman and send the following GET request: localhost:3000/file. Remember the _id attribute of one of the files -
2 Send the following PUT request: localhost:3000/file/id={mongoDBID}, where {mongoDBID} is the _id attribute of the first file that has been received in step 1. Use the JSON testdata below as body of the PUT request. You receive a JSON response containing "status": "success", as well as the object that hast just been manipulated (name and content)
3 Send the following GET request: localhost:3000/file The content and name of the file have been changed according to the name and content of the testdata.

Testdata:

{
  "file": {
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?><Types xmlns=\"http://schemas.openxmlformats.org/package/2006/content-types\"><Default Extension=\"aml\" ContentType=\"model/vnd.automationml+xml\" /><Default Extension=\"rels\" ContentType=\"application/vnd.openxmlformats-package.relationships+xml\" /><Default Extension=\"xsd\" ContentType=\"text/xml\" /><Default Extension=\"png\" ContentType=\"image/png\" /><Default Extension=\"bmp\" ContentType=\"image/bmp\" /><Default Extension=\"edz\"ContentType=\"application/octet-stream\" /><Default Extension=\"xml\" ContentType=\"text/xml\" /></Types>",
    "name": "New_Test_Name.xml"
  }
}
Clone this wiki locally