From f714ba6de039c1423885bd115725b9d172e3ba7a Mon Sep 17 00:00:00 2001 From: Tan Wang Leng Date: Sun, 10 Sep 2017 09:12:21 +0800 Subject: [PATCH] DeveloperGuide: Change setup to use default test configuration (#87) The working directory needs to be changed for the tests to run properly. Therefore, the developer guide instructs the developer to modify the generated test configuration. If the IDE generates another new test configuration, the settings needs to be changed again, otherwise the tests will fail again. Let's change the instructions to ask the developers to modify the default test configuration instead of the generated one. --- doc/DeveloperGuide.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/DeveloperGuide.md b/doc/DeveloperGuide.md index e2ed428c6..f77866560 100644 --- a/doc/DeveloperGuide.md +++ b/doc/DeveloperGuide.md @@ -35,9 +35,10 @@ 10. Run all the tests (right-click the `test` folder, and click `Run 'All Tests'`) 11. Observe how some tests fail. That is because they try to access the test data from the wrong directory (the working directory is expected to be the root directory, but IntelliJ runs the test with `test\` as the working directory by default). To fix this issue: 1. Go to `Run` -> `Edit Configurations...` - 2. On the list at the left, ensure that `All in test` is selected - 3. Under `Configuration`, change the `Working directory` to the `addressbook-level3` folder - 4. Click `OK` + 2. On the list at the left, expand `JUnit`, and remove all the test configurations (e.g. `All in test`) by selecting it and clicking on the '-' icon at the top of the list + 3. Expand `Defaults`, and ensure that `JUnit` is selected + 4. Under `Configuration`, change the `Working directory` to the `addressbook-level3` folder + 5. Click `OK` 12. Run the tests again to ensure they all pass now. ## Design