-
Notifications
You must be signed in to change notification settings - Fork 9
Test Strategy
This document details our testing approach. It's aim is to create a shared understanding of the approach and tools we are going to use with respect to testing.
The main principle of our testing strategy is shared responsibility. As everybody is going to write code at some point, it's important everybody not only writes testable code but also writes test for them. All types of tests (unit, integration, acceptance, regression, performance) should be automated. Manual testing will of course also play an important role in that your tests can not cover every possibility, and it will allow programmers to come up with new tests and improve their work.
In order not to fall behind on testing, tests should be implemented as soon as possible, which would make implementing new stuff easier without 'breaking' previously written code. Apart from testing as early as possible, it also needs to be done as often as possible, in order to find as much defects before continuing development. In general, the test cases and testing code should have the same priority as 'normal' code. This is summarized down below.
- Shared Responsibility
- Test Automation
- Test Often and Early
Attribute | Description | Measure and Target | Priority |
---|---|---|---|
Correctness | All implemented features and functions work as intended. | 100% completion of all features. | Very High |
Integrity | Prevent unauthorized access, protect privacy of entered data, prevent information loss | All access will be via HTTPS over a secured connection. | Very High |
Maintainability | How easy it is to add features, release changes or repair defects. | Code Duplication < 7% *** Unit Test Coverage > 80% *** Method Length < 20 lines | Very High |
Availability | Percentage of planned-up time that the system should be operational. | 99.99% availability of web application | High |
Performance | Expected performance of a general user request | Response Time < 200ms | High |
This section specifies what is in the scope for the tests, based on the scope of the project.
As our entire project is a client-side web application, the whole front-end and all of it's functionalities should be tested.
This section describes the different test types and the tools used to execute them. A build will fail if one of the tests fails.
Unit tests are tests that verify the implementation of software elements in isolation. As TypeScript is our main language, we use JasmineJS as the framework and KarmaJS as the test runner. The unit tests are automatically run every time the project is built. Building will fail if a single unit test fails.
End-to-end testing tests the application by automating front-e
Type | Definition | Tools | Execution/Timing |
---|---|---|---|
Unit | Testing that verifies the implementation of software elements in isolation. | Framework: JasmineJS -- Runner: KarmaJS | Upon implementing new methods. |
End-to-end | Testing an integrated hardware and software system to verify that the system meets required functionality. | Selenium Webdriver | Upon implementing new functionalities. |
Acceptance | Testing based on acceptance criteria to enable the customer to determine whether or not to accept the system. | User Acceptance Testing | In week 7 and 9 (more on this later) |
Performance | Testing to confirm that the system meets required performance. | JMeter | Upon implementing new functionalities. |
- Display information about app
Description | Display information about app |
---|---|
Preconditions | None |
Postconditions | Information is displayed |
Normal flow |
|
Alternative flows | -- |
- Display contact information
Description | Display contact information |
---|---|
Preconditions | None |
Postconditions | Contact information is displayed |
Normal flow |
|
Alternative flows | -- |
- Link to gitHub repository
Description | Link to UnSHACLed GitHub repository |
---|---|
Preconditions | None |
Postconditions | User has been referred to UnSHACLed Github repository. |
Normal flow |
|
Alternative flows | -- |
- Link to latest release notes
Description | Link to latest release notes |
---|---|
Preconditions | None |
Postconditions | User has been referred to latest release notes. |
Normal flow |
|
Alternative flows | -- |
- Login without authentication/authorization
Description | Login without authentication/authorization |
---|---|
Preconditions | None |
Postconditions | User is "logged in", i.e. has loaded the visual editor. |
Normal flow |
|
Alternative flows |
|
- Logout without authentication/authorization
Description | Logout without authentication/authorization |
---|---|
Preconditions | User is "logged in". |
Postconditions | User is "logged out". |
Normal flow |
|
Alternative flows | -- |
- Filter building blocks
Description | Filter building blocks |
---|---|
Preconditions | User is "logged in". |
Postconditions | Building blocks have been filtered according to search string. |
Normal flow |
|
Alternative flows | -- |
- Drag nodes
Description | Drag nodes |
---|---|
Preconditions | User is "logged in". |
Postconditions | Node has been dragged. |
Normal flow |
|
Alternative flows | -- |
-
Display information about app
-
Display contact information
-
Link to UnSHACLed GitHub repository
-
Link to latest release notes
-
Login without authentication/authorization
-
Logout without authentication/authorization
-
Filter building blocks
-
Drag nodes
-
Import graph
Description | Import graph |
---|---|
Preconditions | User is "logged in". |
Postconditions | Graph has been imported (and displayed). |
Normal flow |
|
Alternative flows | -- |
- Save graph
Description | Save graph |
---|---|
Preconditions | User is "logged in". |
Postconditions | Graph has been downloaded as file. |
Normal flow |
|
Alternative flows | -- |
- Hide the sidebar
Description | Hide the sidebar |
---|---|
Preconditions | User is "logged in". |
Postconditions | The sidebar has been hidden |
Normal flow |
|
Alternative flows | -- |
- Delete selected node
Description | Delete selected node |
---|---|
Preconditions | User is "logged in". |
Postconditions | The selected node has been deleted. |
Normal flow |
|
Alternative flows |
|
- Undo last change
Description | Undo last change |
---|---|
Preconditions |
|
Postconditions | The last change has been made undone. |
Normal flow |
|
Alternative flows | -- |
- Redo last change
Description | Redo last change |
---|---|
Preconditions |
|
Postconditions | The change that was most recently undone has been redone. |
Normal flow |
|
Alternative flows |
|
- Take snapshot
Description | Take snapshot |
---|---|
Preconditions | User is "logged in". |
Postconditions | A new window has opened containing a snapshot of the graph structure. |
Normal flow |
|
Alternative flows | -- |
- Zoom in
Description | Zoom in |
---|---|
Preconditions | User is "logged in". |
Postconditions | The editor has zoomed in. |
Normal flow |
|
Alternative flows | -- |
- Zoom out
Description | Zoom out |
---|---|
Preconditions | User is "logged in". |
Postconditions | The editor has zoomed out. |
Normal flow |
|
Alternative flows | -- |
- Fullscreen
Description | Fullscreen |
---|---|
Preconditions | User is "logged in". |
Postconditions | The canvas view is zoomed out to contain the entire graph structure. |
Normal flow |
|
Alternative flows | -- |
- Detail
Description | Detail |
---|---|
Preconditions | User is "logged in". |
Postconditions | The canvas view has assumed its original depth. |
Normal flow |
|
Alternative flows | -- |
- Create node by dragging building block
Description | Create node by dragging building block |
---|---|
Preconditions | User is "logged in". |
Postconditions | A new node of the respective type has been created. |
Normal flow |
|
Alternative flows |
|
- Edit node field
Description | Edit node field |
---|---|
Preconditions |
|
Postconditions | A node field has been altered (for this sprint, altered is synonymous with emptied). |
Normal flow |
|
Alternative flows | -- |
- Display information about app
- Display contact information
- Link to UnSHACLed GitHub repository
- Link to latest release notes
- Login without authentication/authorization
- Logout without authentication/authorization
- Filter building blocks
- Drag nodes
- Save graph
- Hide the sidebar
- Delete selected node
- Undo last change
- Redo last change
- Take snapshot
- Zoom in
- Zoom out
- Fullscreen
- Detail
- Edit node field
- Import data graph
Description | Import data graph |
---|---|
Preconditions | User is "logged in". |
Postconditions | Data graph has been imported and displayed. |
Normal flow |
|
Alternative flows | -- |
- Import SHACL graph
Description | Import SHACL graph |
---|---|
Preconditions | User is "logged in". |
Postconditions | Shapes graph has been imported and displayed. |
Normal flow |
|
Alternative flows | -- |
- Check conformance errors
Description | Check conformance errors |
---|---|
Preconditions | User is "logged in". |
Postconditions | A message has been displayed containing active violations. |
Normal flow |
|
Alternative flows |
|