Test Specification
Test Specification: Stuff Lending System
This is an informal specification of tests to perform when you are done with the assignment design and implementation. It is adviced to perform all tests before the final release. If you find problems you fixt them and again perform all tests.
The test cases are written in a general form and you may need to adapt them to your specific implementation and the decisions you have made during the implementation. In that case submit a refined test spec as a project deliverable.
General
- Clone the application from gitlab into a new directory. Avoid running the application in the development environment.
- run the application with
./gradlew run -q --console=plain
- If you cannot perform one of the steps in the application e.g. it crashes or does not behave as stated you have found a bug. Document it and run the rest of the test cases.
Test Report
The test repors is a simple list of test cases performed and the result, i.e. working or not working. If it is not working note what step and what the result was.
You should have a final test report in your repository when handing in the assignment.
Example Test Report
Version #234234 (git commit hash/link)
Date: 2022.08.17
Environment: Windows, Java version 18.
Performed by: Tobias
Case | Result | Note |
---|---|---|
5.1 | not ok | 4. Wrong lending period |
1.1 | ok | |
1.2 | ok | |
1.3 | not ok | 3. Crash with null pointer exception |
... | ... | ... |
Test Cases
5.1 Member Data
Requirement: 5
- Check that there are at least 3 Members.
- Check that one member (M1) with 500 credits. M1 has two items for lending, I1 with cost 50 one cheap I2 cost 10
- Check that one member (M2) with 100 credits. M2 has no items for lending.
- Check that one member (M3) with 100 credits has an active lending contract for I2 that starts on day 5 and ends on day 7 (3 days).
1.1 Create Member
Requirement: 1.1, 1.1.1, 1.4
- Create a member with name: "Allan Turing", email: "allan@enigma.com", phone: "123456"
- Check that the member is created correctly with an id according to the requirement by checking the members full information.
- Quit the application
1.2 Create Member - Duplicate Email and Phone
Requirement: 1.1, 1.1.1, 1.1.2, 1.4
- Create a member with name: "Allan", email: "allan@enigma.com", phone: "123456"
- Check that the member is created correctly with an id according to the requirement by checking the members full information.
- Create a member with name: "Turing", email: "allan@enigma.com", phone: "123"
- Check that the member is not created (duplicate email)
- Create a membner with name: "Turing", email: "turing@enigma.com", phone: "123456"
- Check that the member is not created (duplicate phone)
- Create a member with name "Turing" , email: "turing@enigma.com", phone: "123"
- Check that the member is created correctly with an id according to the requirement by checking the members full information.
- Quit the application
1.3 Delete Member
Requirement: 1.1, 1.1.1, 1.1.2, 1.4
- Create a member with name: "Allan", email: "allan@enigma.com", phone: "123456"
- Check that the member is created correctly with an id according to the requirement by checking the members full information.
- Delete the member
- Check that the member is deleted by listing all members (simple)
- Create a member with name: "Allan", email: "allan@enigma.com", phone: "123456"
- Check that the member is created correctly with an id according to the requirement by checking the members full information.
- Quit the application.
2.1 Create item
- Create an item for a Member
- Check that the item is created and part of the Members items by inspecint the member's details.
- Check that the owner member has increased it's credits with 100
2.2 Delete item
- Select a member with one or several items
- Delete one of the member's items that is not involved in any contract
- Check that the item was deleted from the members owned items
2.3 Delete item
- Select a member with one or several items
- Delete one of the member's items that is booked (i.e. a future contract)
- Check that the item was deleted from the members owned items
- Check that the contract was cancelled
3.1 Create Contract
- Create a contract for I2 lending to M2, 3 days of lending, day 1 to and including day 3
- Check that the contract was created
3.2 Create Contract - not enough funds
- Create a contract for I1 lending to M2, 3 days of lending (e.g. day 1 to and including day 3)
- Check that the contract was not created due to lack of funds
3.3 Create Contract - conflicting time
- Create a contract for I2 lending to M2, 3 days of lending, day 4 to and including day 6
- Check that the contract was not created due to conflicting time
3.4 Create Contract - conflicting time
- Create a contract for I2 lending to M2, 3 days of lending, day 6 to and including day 9
- Check that the contract was not created due to conflicting time
3.5 Create Contract - conflicting time
- Create a contract for I2 lending to M2, 3 days of lending, day 4 to and including day 9
- Check that the contract was not created due to conflicting time
3.6 Create Contract - conflicting time
- Create a contract for I2 lending to M2, 3 days of lending, day 6 to and including day 6
- Check that the contract was not created due to conflicting time
4.1 Advance time
- Advance the time 8 days.
- Check that the contract has been fullfilled and that funds have been deduced from M3 who now has 70 credits.