From 74ec38a7c1fa4877876679f895690d252f99a83f Mon Sep 17 00:00:00 2001 From: Tan Wang Leng Date: Sun, 10 Sep 2017 09:11:32 +0800 Subject: [PATCH] [#208] DeveloperGuide: Change setup to use default test configuration (#226) 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 a1201c4d8..fcfaccf95 100644 --- a/doc/DeveloperGuide.md +++ b/doc/DeveloperGuide.md @@ -28,9 +28,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-level2` 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-level2` folder + 5. Click `OK` 12. Run the tests again to ensure they all pass now. ## Design