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:
4
spring-boot-cli/testscripts/book.groovy
Normal file
4
spring-boot-cli/testscripts/book.groovy
Normal file
@@ -0,0 +1,4 @@
|
||||
class Book {
|
||||
String author
|
||||
String title
|
||||
}
|
||||
12
spring-boot-cli/testscripts/book_and_tests.groovy
Normal file
12
spring-boot-cli/testscripts/book_and_tests.groovy
Normal 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)
|
||||
}
|
||||
}
|
||||
0
spring-boot-cli/testscripts/empty.groovy
Normal file
0
spring-boot-cli/testscripts/empty.groovy
Normal file
12
spring-boot-cli/testscripts/spock.groovy
Normal file
12
spring-boot-cli/testscripts/spock.groovy
Normal 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
|
||||
}
|
||||
}
|
||||
7
spring-boot-cli/testscripts/test.groovy
Normal file
7
spring-boot-cli/testscripts/test.groovy
Normal 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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user