-
Notifications
You must be signed in to change notification settings - Fork 2
Frutilla in the console
ignaciotcrespo edited this page Aug 16, 2015
·
4 revisions
Frutilla shows all use cases in console in realtime while the tests are running.
Below is how the console looks when running the tests of Frutilla project. The plan is to add more details, the state of the test, scenarios, links to specs, etc.
/------------------------------------------\
Test: testWhenMultiple
--------------------------------------------
GIVEN multiple 'when' sentences
WHEN are added
THEN all sentences exist
--------------------------------------------
- PASSED -
\------------------------------------------/
/------------------------------------------\
Test: testAllTogether
--------------------------------------------
GIVEN all kind of sentences
WHEN are added
THEN all exist
--------------------------------------------
- PASSED -
\------------------------------------------/
/------------------------------------------\
Test: testGiven
--------------------------------------------
GIVEN a 'given' sentence
WHEN is declared
THEN the sentence exists
--------------------------------------------
- PASSED -
\------------------------------------------/
/------------------------------------------\
Test: testReset
--------------------------------------------
GIVEN some sentences added
WHEN clear all sentences
THEN there are no sentences
--------------------------------------------
- PASSED -
\------------------------------------------/
/------------------------------------------\
Test: testThen
--------------------------------------------
GIVEN a 'then' sentence
WHEN is declared
THEN the sentence exists
--------------------------------------------
- PASSED -
\------------------------------------------/
/------------------------------------------\
Test: testWhen
--------------------------------------------
GIVEN a 'when' sentence
WHEN is declared
THEN the sentence exists
--------------------------------------------
- PASSED -
\------------------------------------------/
/------------------------------------------\
Test: testPopSentence
--------------------------------------------
GIVEN some sentences are added
WHEN getting complete sentence
THEN the sentence is correct
AND and is empty after reading sentence
--------------------------------------------
- PASSED -
\------------------------------------------/
/------------------------------------------\
Test: testGivenMultiple
--------------------------------------------
GIVEN multiple 'given' sentences
WHEN are added
THEN all sentences exist
--------------------------------------------
- PASSED -
\------------------------------------------/
/------------------------------------------\
Test: testThenMultiple
--------------------------------------------
GIVEN multiple 'then' sentences
WHEN are added
THEN all sentences exist
--------------------------------------------
- PASSED -
\------------------------------------------/
/------------------------------------------\
Test: testError
--------------------------------------------
java.lang.RuntimeException:
[
GIVEN a test with Frutilla annotations
WHEN it fails due to error
THEN it shows the test description in the stacktrace
AND and in the logs
]
[
Message: forced error
]
at org.frutilla.examples.FrutillaExamplesWithAnnotationTest.testError(FrutillaExamplesWithAnnotationTest.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
...
/------------------------------------------\
Test: testFailed
--------------------------------------------
java.lang.AssertionError:
[
GIVEN a test with Frutilla annotations
WHEN it fails
THEN it shows the test description in the stacktrace
AND and in the logs]
at org.junit.Assert.fail(Assert.java:86)
at org.junit.Assert.assertTrue(Assert.java:41)
at org.junit.Assert.assertTrue(Assert.java:52)
at org.frutilla.examples.FrutillaExamplesWithAnnotationTest.testFailed(FrutillaExamplesWithAnnotationTest.java:25)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
...
/------------------------------------------\
Test: testEmptyByDefault
--------------------------------------------
GIVEN nothing declared
WHEN checking if something exists
THEN nothing exists
--------------------------------------------
- PASSED -
\------------------------------------------/
/------------------------------------------\
Test: testPassed
--------------------------------------------
GIVEN a test with Frutilla annotations
WHEN it passes
THEN it shows the test description in the logs
--------------------------------------------
- PASSED -
\------------------------------------------/