Skip to content

Commit ccc7a7a

Browse files
committed
Update README.md
1 parent 77d0873 commit ccc7a7a

1 file changed

Lines changed: 24 additions & 6 deletions

File tree

README.md

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,10 @@ Unit tests to validate the JSON-Java GitHub project code<br>
44

55
https://github.com/douglascrockford/JSON-java<br>
66

7-
*These tests are a work in progress. Help from interested developers is welcome.*<br>
8-
More coverage is needed, but more importantly, improvements to test quality is needed.<br>
9-
10-
Eclipse is the recommended development environment.<br>
7+
Gradle and Eclipse is the recommended build tool and IDE.<br>
118
Run individual tests or <b>JunitTestSuite</b> using <b>EclEmma Coverage</b>, or execute the **TestRunner** application directly.<br>
129

13-
**You will need the following libraries for testing:**<br>
10+
**The following libraries are required:**<br>
1411
* asm-1.0.2.jar<br>
1512
* commons-io-2.1.jar<br>
1613
* commons-lang-2.6.jar<br>
@@ -24,10 +21,31 @@ Run individual tests or <b>JunitTestSuite</b> using <b>EclEmma Coverage</b>, or
2421
* JSON-java.jar<br>
2522

2623
**To build from the command line using gradle:**
27-
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:
24+
Until the unit tests are merged into the JSON-Java project, the code has to be wired by hand.
25+
\# In an empty directory of your choice, clone JSON-Java-unit-test:
26+
````
27+
git clone https://github.com/stleary/JSON-Java-unit-test.git .
28+
````
29+
\# Create a directory structure for the JSON-Java code
30+
````
31+
mkdir -p src\org\json
32+
````
33+
\# clone JSON-Java
34+
````
35+
git clone https://github.com/stleary/JSON-Java-unit-test.git src\org\json
36+
````
37+
\# Build, then execute the unit tests and code coverage
2838
````
2939
gradle clean build test jacocoTestReport
3040
````
41+
Unit test results will be in build\reports\tests\index.html<br>
42+
Code coverage will be in build\reports\jacoco\html\index.html
43+
44+
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<br>
45+
Select File > Import > Gradle > Gradle project <br>
46+
Browse to the directory where you cloned JSON-Java-unit-test<br>
47+
Select Build model<br>
48+
Select built project<br>
3149

3250
<b>Conventions</b><br>
3351
Test filenames should consist of the name of the module being tested, with the suffix "Test".

0 commit comments

Comments
 (0)