diff --git a/README.md b/README.md index 0357b4a..1be9c65 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,10 @@ Unit tests to validate the JSON-Java GitHub project code
https://github.com/douglascrockford/JSON-java
-*These tests are a work in progress. Help from interested developers is welcome.*
-More coverage is needed, but more importantly, improvements to test quality is needed.
- -Eclipse is the recommended development environment.
+Gradle and Eclipse is the recommended build tool and IDE.
Run individual tests or JunitTestSuite using EclEmma Coverage, or execute the **TestRunner** application directly.
-**You will need the following libraries for testing:**
+**The following libraries are required:**
* asm-1.0.2.jar
* commons-io-2.1.jar
* commons-lang-2.6.jar
@@ -24,10 +21,31 @@ Run individual tests or JunitTestSuite using EclEmma Coverage, or * JSON-java.jar
**To build from the command line using gradle:** -Until the unit tests are merged into the JSON-Java project, the code has to be wired by hand. After cloning JSON-Java-unit-test, create a directory structure under src and copy the JSON-Java files into: src/org/json. Then execute the unit tests and code coverage with: +Until the unit tests are merged into the JSON-Java project, the code has to be wired by hand. +\# In an empty directory of your choice, clone JSON-Java-unit-test: +```` +git clone https://github.com/stleary/JSON-Java-unit-test.git . +```` +\# Create a directory structure for the JSON-Java code +```` +mkdir -p src\org\json +```` +\# clone JSON-Java +```` +git clone https://github.com/stleary/JSON-Java-unit-test.git src\org\json +```` +\# Build, then execute the unit tests and code coverage ```` gradle clean build test jacocoTestReport ```` +Unit test results will be in build\reports\tests\index.html
+Code coverage will be in build\reports\jacoco\html\index.html + +To create an Eclipse project, you will need the Eclipse Gradle plug-in, available from the Eclipse Marketplace. I am currently using Gradle IDE 3.6.4.201503050952-RELEASE
+Select File > Import > Gradle > Gradle project
+Browse to the directory where you cloned JSON-Java-unit-test
+Select Build model
+Select built project
Conventions
Test filenames should consist of the name of the module being tested, with the suffix "Test".