Add 'spring test [files]' command to compile and test code automatically

- Look for JUnit test symbols, and add JUnit automatically
- Look for Spock test symbols, and add Spock automatically
- Based on what test libraries were used, invoke relevant embedded testers
  and accumulate results
- Make it so that multiple testers can be invoked through a single 'test' command
- Print out total results and write out detailed trace errors in results.txt
- Update based on the new artifact resolution mechanism
This commit is contained in:
Greg Turnquist
2013-10-03 08:16:48 -05:00
parent 4655eb3a94
commit 1ce13cc2c2
26 changed files with 990 additions and 12 deletions

View File

@@ -0,0 +1,4 @@
class Book {
String author
String title
}

View File

@@ -0,0 +1,12 @@
class Book {
String author
String title
}
class BookTests {
@Test
void testBooks() {
Book book = new Book(author: "Tom Clancy", title: "Threat Vector")
assertEquals("Tom Clancy", book.author)
}
}

View File

View File

@@ -0,0 +1,12 @@
class HelloSpock extends Specification {
def "length of Spock's and his friends' names"() {
expect:
name.size() == length
where:
name | length
"Spock" | 5
"Kirk" | 4
"Scotty" | 6
}
}

View File

@@ -0,0 +1,7 @@
class BookTests {
@Test
void testBooks() {
Book book = new Book(author: "Tom Clancy", title: "Threat Vector")
assertEquals("Tom Clancy", book.author)
}
}