https://github.com/mikebharris/journey-planner-quality-engineer-test
https://github.com/mikebharris/journey-planner-quality-engineer-test
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mikebharris/journey-planner-quality-engineer-test
- Owner: mikebharris
- Created: 2024-06-07T07:28:44.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-06-13T10:34:57.000Z (11 months ago)
- Last Synced: 2025-03-13T01:36:45.902Z (2 months ago)
- Language: Java
- Size: 46.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Train Timetable testing problem
## The background
You have been brought in as a quality engineer on an existing project to build an application to help people plan their train journeys on the Great Western Railway line, which runs from London into the South-West of England.The developers have already written code in Java but claimed that they didn't have time to write the tests!
## Your job
**Your job is to advise us as to what - in terms of libraries and tools - we could use to write unit tests in Java for the existing code.** The scenarios for the unit tests are outlined in the __Acceptance Criteria__ section below.
* We are not expecting you to write the actual unit test code, although if you wish to, please go ahead.
* You may use Google, ChatGPT or any another other resource to find reference resources for Java and unit testing.
* As these are unit tests we do not foresee the need for using Cucumber/Gherkin for these tests, but that is entirely up to you. We will be interested in the decision you make and the justification for it.
* The full train timetable for testing is provided in the [TestData](src/test/java/journey_planner/TestData.java) Java class.
* We would expect the development team to write at least one test per acceptance criterium.
* It should be possible to run the tests using `gradle clean test` (Linux/Mac) or `./gradlew clean test` (Windows)
* If you wish to provide them, we would welcome any comments you have about the existing code, and this exercise.
## Acceptance Criteria
|Criterion|Given|When|Then|
|---|-----|----|----|
|*Report Duration Of Journey Between Two Stations*|The 0907 train from Camborne is scheduled to reach Exeter St Davids at 1137|I ask for the journey time from Camborne to Exeter St Davids if I am at the station at 0907|I am told it will take 150 minutes|
|*Report Duration For First Available Train*|The 0907, 1023 and 1112 trains from Camborne are scheduled to reach Exeter St Davids at 1137, 1302 and 1357, respectively|I ask for the journey time from Camborne to Exeter St Davids if I am at the station at 1023|I am told it will take 159 minutes|
|*Report Duration Including Waiting Time On Platform*|The 0944, 1100 and 1150 trains from St Austell are scheduled to reach Par at 0951, 1108 and 1157, respectively|I ask for the journey time from St Austell to Par if I am at the station at 1101|I am told it will take 56 minutes|