Exercise 2: Input Domain Modeling
You are asked to design an input domain model (IDM) for testing the Sitodo PMPL. Specifically, you have to create an IDM for testing at least two features as unit tests in the project's codebase.
Once you have the IDM, you need to define the test values (i.e. the input values) by following a coverage criteria of your choice such as All Combination Coverage (ACoC) or Pairwise Coverage (PWC). You can use a template for the IDM that is available in Markdown or Microsoft Word.
Finally, update the existing JUnit unit test suites in the project's codebase by adding new test cases (as JUnit test methods).
Write the new test cases as a JUnit test suite class in a new test package named com.example.sitodo.inputspace
,
which should be located in the src/test/java/com/example/sitodo/inputspace
folder of the project's codebase once you have created it correctly.
Even though there might be some overlap with the existing test suites,
you still need to write the test cases because it is part of the exercise.
We also provide an IDM example from past exercise if you require a reference on how to create an IDM.
Tasks
- Fork the Sitodo PMPL repository to your own account on GitLab CS.
Please note that the upstream (original) repository in the above link is different from Sitodo PMPL project used in previous exercises. Hence, make sure you complete this exercise on the correct fork of the project!
- Clone the Git repository of the new fork into your local development machine.
- Open the cloned Git repository as a project using your favourite text editor or IDE that supports Java-based project.
- Create a new branch named
exercise2
from themain
branch of your cloned fork. - Choose two methods from the codebase that correspond to the features you want to test.
- Create the input domain model for each method you picked.
Please choose whether to follow interface-based (syntax) or functionality-based approach (behaviour) for each feature/method when trying to identify the characteristics and their partition. Explain your reason to choose your selected approach in your written documentation.
- Identify the constraints among characteristics, if exists.
Remember that specifying constraints in the IDM can help filtering out unfeasible test values values from being picked up, thus may reduce the number of possible test cases.
- Determine the test values based on your resulting IDM. Feel free to use any criteria that you think is the most effective.
- Update the existing JUnit test suites by implementing new test methods based on your identified test values from previous step.
Add the new test methods into a new JUnit test suite class and put the new test suite class into a new package named
com.example.sitodo.inputspace
. - Do not forget to commit and push your changes to your fork on GitLab CS!
Deliverables
At the end of this exercise, you are required to prepare the following artifacts:
- A written document that describes the process of your work in completing
this exercise. You can write the document as a Markdown-formatted text file
or a PDF file. Give the document a descriptive name, e.g.
exercise2.md
, and put it into a folder calleddocs
in your fork codebase. - Two or more added test suites. Please commit any changes to the test suites into
separate branch named
exercise2
from yourmain
branch in your fork codebase.
The due date of this exercise is: 24 November 2023, 23:59 UTC+7. Please ensure any updates to the fork repository related to this exercise were made and pushed before the due date.
References
- Ch 6. Input Space Partitioning slide at Paul Amman's Introduction to Software Testing book website
- 6.005 — Software Construction on MIT OpenCourseWare | Reading 3: Testing
Appendix 1: Markdown Template
You can use the following Markdown template to document the IDM in your
exercise2.md
file.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
|
Tips: If you write using Markdown and want to export the document as PDF file, you can use
pandoc
to export text file written in Markdown into a PDF.
Created: 2023-11-15 14:05:09