more verbose test output possible?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

more verbose test output possible?

Frank Weber

I got the following output when running mvn test on the simple story
at the end of this email.

Is this a feature, or can this be configured / displayed more verbose?
I am used to something like expected 10, was 1 or similar.


Regards,

Frank

Test Report in the console:

Running groovy.StorySpock
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.14
sec <<< FAILURE!

Results :

Failed tests:
  credit account(groovy.StorySpock)

Tests run: 3, Failures: 1, Errors: 0, Skipped: 0



<<<<<<<<  StorySpock.groovy  >>>>>>>>>>>>>>
import spock.lang.*
import static spock.lang.Predef.*

@Speck
@RunWith(Sputnik)
public class StorySpock {

def "credit account"() {

given: "an empty bank account"
        def account = 0

when: "the account is credited USD 10"
        account = account + 10

then: "the account's balance is USD 10"
        account == 1
        }

}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Spock Framework" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.de/group/spockframework?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: more verbose test output possible?

Peter Niederwieser
Administrator

This is a Maven feature. Per default, Maven writes test results to a  
file, but not to the console. To change that, add the following to  
your POM:

<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
                <useFile>false</useFile>
        </configuration>
</plugin>

Now you should see immediately what went wrong.

Cheers,
Peter

On Aug 3, 2009, at 5:51 PM, Frank Weber wrote:

>
> I got the following output when running mvn test on the simple story
> at the end of this email.
>
> Is this a feature, or can this be configured / displayed more verbose?
> I am used to something like expected 10, was 1 or similar.
>
>
> Regards,
>
> Frank
>
> Test Report in the console:
>
> Running groovy.StorySpock
> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.14
> sec <<< FAILURE!
>
> Results :
>
> Failed tests:
>  credit account(groovy.StorySpock)
>
> Tests run: 3, Failures: 1, Errors: 0, Skipped: 0
>
>
>
> <<<<<<<<  StorySpock.groovy  >>>>>>>>>>>>>>
> import spock.lang.*
> import static spock.lang.Predef.*
>
> @Speck
> @RunWith(Sputnik)
> public class StorySpock {
>
> def "credit account"() {
>
> given: "an empty bank account"
> def account = 0
>
> when: "the account is credited USD 10"
> account = account + 10
>
> then: "the account's balance is USD 10"
> account == 1
> }
>
> }
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Spock Framework" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.de/group/spockframework?hl=en
-~----------~----~----~----~------~----~------~--~---

Loading...