Browse files

More examples provided, documentation cleaned up

  • Loading branch information...
1 parent e5d0ca7 commit b6568357a3167da2da8e039c83bd40f0b8b3d533 @klauern committed Jan 20, 2010
View
3 .gitignore
@@ -1,3 +1,4 @@
target/*
fitnesse.jar
-src/main/fitnesse/files/testResults/
+src/main/fitnesse/FitNesseRoot/files/testResults/
+src/main/fitnesse/FitNesseRoot/ErrorLogs/
View
35 README.md
@@ -16,22 +16,45 @@ What Examples you can use
-------------------------
There are a number of examples that I'm trying to get working, so my luck has been
mixed. Here's some things you can do right now:
-
mvn clean install exec:exec
-
will run a local FitNesse installation on port 18080, which you can access at
http://localhost:18080/
The tests I've written are both on wiki pages and as JUnit tests to integrate the
-results with.
-
-If there are results to show, you would find them under
+results with. If there are results to show, you would find them under
target/surefire-reports/
-
But this is where I'm missing something.
+Some other examples to run:
+
+ > mvn test -Dtest=ThrowSomeExceptionWikiTest
+ > mvn test -Dtest=ExampleTestRunnerTest
+ > mvn test -Dtest=JUnitHelperTrinidadTest
+
+In each of these examples, output isn't necessarily correlated to expectations.
+
+=== JUnitHelperTrinidadTest ===
+In this test, I try two things:
+
+ 1. Run the [FrontPage.ExceptionThrowingWikiTest][4] and assert that it passed (it
+ shouldn't.
+ 2. Run the [FrontPage.SecondTestSuite][5] suite and assert that it passed (it
+ should).
+
+What I would expect is that the JUnit result shows that the first test threw an
+exception, and the second one passed. What happens is different, however.
+
+ * No output in target/surefire-reports/ for the JUnitHelperTrinidadTest at all.
+
+
+Where I've been pulling these examples from:
+--------------------------------------------
+ 1. http://fitnesse.info/trinidad - Trinidad Plugin page
[1]: http://fitnesse.org/
[2]: http://maven.apache.org/
[3]: http://fitnesse.info/trinidad
+[4]: http://localhost:18080/FrontPage.ExceptionThrowingWikiTest
+[5]: http://localhost:18080/FrontPage.SecondTestSuite
+[6]: http://localhost:18080/FrontPage.TestSuite
View
6 pom.xml
@@ -152,8 +152,4 @@
</dependency>
</dependencies>
-
-</project>
-
-
-
+</project>
View
4 src/main/fitnesse/FitNesseRoot/ErrorLogs/FrontPage/ExceptionThrowingTest/content.txt
@@ -1,6 +1,6 @@
!3 !-fit-!
-|'''Date: '''|!-10:26:44 AM (CST) on Wednesday, January 20, 2010-!|
+|'''Date: '''|!-10:54:44 AM (CST) on Wednesday, January 20, 2010-!|
|'''Test Page: '''|.FrontPage.ExceptionThrowingTest|
|'''Command: '''|!-java -cp fitnesse.jar:defaultPath fit.FitServer a03182-ubuntu 18080 1-!|
|'''Exit code: '''|!-1-!|
-|'''Time elapsed: '''|!-0.342 seconds-!|
+|'''Time elapsed: '''|!-0.373 seconds-!|
View
6 src/main/fitnesse/FitNesseRoot/ErrorLogs/FrontPage/SecondTestSuite/ExampleTest2/content.txt
@@ -1,6 +1,6 @@
!3 !-slim-!
-|'''Date: '''|!-10:21:49 AM (CST) on Wednesday, January 20, 2010-!|
+|'''Date: '''|!-10:52:41 AM (CST) on Wednesday, January 20, 2010-!|
|'''Test Page: '''|.FrontPage.SecondTestSuite.ExampleTest2|
-|'''Command: '''|!-java -cp fitnesse.jar:defaultPath fitnesse.slim.SlimService 8087-!|
+|'''Command: '''|!-java -cp fitnesse.jar:defaultPath fitnesse.slim.SlimService 8090-!|
|'''Exit code: '''|!-0-!|
-|'''Time elapsed: '''|!-0.396 seconds-!|
+|'''Time elapsed: '''|!-0.377 seconds-!|
View
2 src/main/fitnesse/FitNesseRoot/FrontPage/SecondTestSuite/ExampleTest2/content.txt
@@ -15,4 +15,4 @@ This suite will fail and throw exceptions.
|22 |7 |~=3.14 |
|9 |3 |<5 |
|11 |2 |4<_<6 |
-|100 |4 |33 |
+|100 |4 |25.0 |
View
2 src/main/fitnesse/FitNesseRoot/RecentChanges/content.txt
@@ -1,6 +1,6 @@
+|FrontPage.SecondTestSuite.ExampleTest2||10:52:38 Wed, Jan 20, 2010|
|FrontPage.ExceptionThrowingTest||10:26:20 Wed, Jan 20, 2010|
|FrontPage||10:24:55 Wed, Jan 20, 2010|
-|FrontPage.SecondTestSuite.ExampleTest2||10:21:47 Wed, Jan 20, 2010|
|FitNesse.SuiteAcceptanceTests.SuiteSlimTests.ErikPragtBug||10:08:10 Wed, Jan 20, 2010|
|FrontPage.TestSuite.ExampleTest||13:43:43 Tue, Jan 19, 2010|
|FrontPage.SecondTestSuite||21:27:57 Sun, Dec 20, 2009|
View
6 src/test/java/klauer/fitnessemvn/JUnitHelperTrinidadTest.java
@@ -31,8 +31,8 @@ public void initHelper() throws Exception {
/**
* Produces an exception, since one of the two asserts failed.
*
- * The concern with using this method is that runSomeTests() will be
- * flagged as having failed, rather than the FitNesse page itself.
+ * The concern with using this method is that runSomeTests() won't even
+ * flag as having failed, rather than the FitNesse page itself.
*
* Also, should the failure occur in a suite, you have almost no way
* to know which test in that suite failed, or even which assert below
@@ -41,7 +41,7 @@ public void initHelper() throws Exception {
*/
@Test
public void runSomeTests() throws Exception {
- helper.assertTestPasses("FitNesse.UserGuide.TwoMinuteExample");
+ helper.assertTestPasses("FrontPage.ExceptionThrowingWikiTest");
helper.assertSuitePasses("FrontPage.SecondTestSuite");
}

0 comments on commit b656835

Please sign in to comment.