Skip to content

Commit

Permalink
Documentation updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
amolenaar committed Mar 12, 2015
1 parent 82ff334 commit dc8ae3b
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ See also: CommandLineArguments.

The class specified must implement the ''fitnesse.wiki.!-WikiPageFactory-!'' interface. It must provide a public default constructor or a constructor with the form:''public !-WikiPageFactory-!(Properties properties).'' The Properties define the properties defined in the configuration properties file and on the command line.

!3 Html Page Factory
''required property:'' '''!-HtmlPageFactory-! = <class name>'''

''motivation:'' Full customization of look and feel.

The class specified must extend the ''fitnesse.html.!-HtmlPageFactory-!'' class and it must also provide a constructor that accept a Properties object. The custom !-HtmlPageFactory-! will over ride the newPage() method to return a derivative of ''fitnesse.html.!-HtmlPage-!''. The custom !-HtmlPage-! class should make use of any of the public !-HtmlTag-! member variables.

!3 Versions Controller
''required property:'' '''!-VersionsController-! = <class name>'''

Expand Down Expand Up @@ -151,6 +144,8 @@ In case there are situations where you can not get your tests working with the d

''motivation:'' Register multiple Responders, symbol types, !-WikiPage-! factories, test systems, Slim tables or comparators from a single Java class, instead of multiple entries in plugins.properties.

Please also have a look at the page on WritingPlugins. It provides an alternative (simpler) way to register plugins by using the Java Service loader facility.

Plugins classes can provide one or more of the following methods to register components:

* '''registerResponders(!-ResponderFactory-! responderFactory)''' - register responders using ''!-ResponderFactory.addResponder(String key, Class responderClass)-!''
Expand All @@ -165,3 +160,15 @@ Plugins are instantiated by FitNesse's !-ComponentFactory-!. By doing so they
* Plugin(!-ComponentFactory-! componentFactory)
* Plugin(Properties properties)
* Plugin()

!1 Other properties

There are more properties which can be used to tweak parts of FitNesse:

* '''newpage.default.content''' - default page content for an empty page, in case you're not creating a new page based on a template page.
* '''VersionsController.days''' - number of days to keep old page versions around when using the Zip file based versions controller.
* '''test.history.days''' - The number of days to keep test results around. Cleaned up after a new test run.
* '''test.history.path''' - Location to store the test results. The default location is ''!-FitNesseRoot-!/files/testResults''.
* Any variable that can be defined on a wiki page.

The Slim test system has a set of [[custom properties][<UserGuide.WritingAcceptanceTests.SliM]] that can either be set on a page or in the configuration file.
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
!2 The Slim Protocol, version 0.4

!-FitNesse-! communicates with Slim over a socket (see >PortManagement). When you hit the ''Test'' button, !-FitNesse-! starts up a !-SlimServer-! process by issuing the appropriate command line. !-FitNesse-! then sends a list of instructions to the !-SlimServer-!, and expects a list of responses back. The instructions are things like ''call function f(a,b,c)'' or ''make instance of class X with arguments p,q,r''. The responses are simply the values that are returned by the instructions.

{{{
instruction list
+----------+ o---> +------------+ +----------+ +-----+
Expand All @@ -7,8 +10,6 @@
response list
}}}

!-FitNesse-! communicates with Slim over a socket (see >PortManagement). When you hit the ''Test'' button, !-FitNesse-! starts up a !-SlimServer-! process by issuing the appropriate command line. !-FitNesse-! then sends a list of instructions to the !-SlimServer-!, and expects a list of responses back. The instructions are things like ''call function f(a,b,c)'' or ''make instance of class X with arguments p,q,r''. The responses are simply the values that are returned by the instructions.

Each instruction in the list is itself a list of strings. Here is a typical instruction list:{{{
[
[id_0, make, instance, fixture, argument],
Expand Down Expand Up @@ -127,10 +128,13 @@ There are some standard exception messages that every Slim implementation should
| NO_INSTANCE ''<instance name>'' | Where ''<instance name>'' is the name of the missing instance. |
| NO_CLASS ''<some class>'' | Where ''<some class>'' is the class that could not be found. |
| MALFORMED_INSTRUCTION [''instruction list''] | Where ''instruction list'' is a comma separated list of the instruction strings. |
| TIMED_OUT ''<n>'' | The instruction timed out after ''<n>'' seconds. To enforce timeouts, set the ''-s xx'' flag (via the ''slim.flags'' variable) |

!4 Aborting a Test
!4 Aborting a Test
If a fixture throws an exception with a ''class'' name that contains "!style_code(!-StopTest-!)", then Slim should stop executing the instructions in the current batch, and return immediately. The response for this type of exception should be "!style_code(__EXCEPTION__:ABORT_SLIM_TEST:)" which may have an optional suffix of: "!style_code(message:<<''reason''>>)".

To abort the test suite (stop execution directly), throw an exception with a class name that contains "!style_code(!-StopSuite-!)". The syntax is identical to !-StopTest-!.

!3 Type Conversions
The only types in the instructions and responses are lists and strings, and since the leaves of the lists must eventually be strings, all we really have to worry about are strings. But we don't want to restrict our fixtures to use only Strings. So Slim comes with some standard type converters that allow fixtures to take more convenient data types.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<properties>
<Edit>true</Edit>
<Files>true</Files>
<Properties>true</Properties>
<RecentChanges>true</RecentChanges>
<Refactor>true</Refactor>
<Search>true</Search>
<Versions>true</Versions>
<WhereUsed>true</WhereUsed>
<Edit>true</Edit>
<Files>true</Files>
<Properties>true</Properties>
<RecentChanges>true</RecentChanges>
<Refactor>true</Refactor>
<Search>true</Search>
<Versions>true</Versions>
<WhereUsed>true</WhereUsed>
</properties>
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,13 @@ The Slim test system can be configured using the following properties:
| slim.port | 8085 | Base port for SLIM. |
| slim.pool.size | 10 | The size of the pool of ports to cycle through. By default the ports 8085 up to 8095 are used (''slim.port'' + ''slim.pool.size''). |
| slim.host | localhost | The host the SLIM server will be running on. This is mostly useful if you're running a remote SLIM server. |
| slim.flags | | Extra flags to provide to the SLIM server. |
| slim.flags | | Extra flags to provide to the SLIM server. Arguments supported by the slim service are: !-
-![-v] [-i interactionClass] [-s statementTimeout] [-d] [-ssl parameterClass]|
| slim.timeout | 10 seconds | Connection timeout starting and finishing a test run. |
| slim.debug.timeout | ''slim.timeout'' | Same as ''slim.timeout'', used when the debug property is set (falls back to ''slim.timeout''). |
| manually.start.test.runner.on.debug | false | Do not launch a SLIM server if the test is ran in debug mode. |

Those properties can be either provided on the command line (e.g. ''-Dslim.port=9000'') or in the plugins.properties file.
Those properties can be either provided by a wiki page, on the command line (e.g. ''-Dslim.port=9000'') or in the plugins.properties file.

!4 Extra Goodies that are consistent throughout all Slim tables and ports.
| [[''Exception Handling''][>ExceptionHandling]] |
Expand Down
2 changes: 1 addition & 1 deletion FitNesseRoot/FitNesse/UserGuide/content.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ The goal is for !-FitNesse-! to operate at a level just ''below'' the user inter
Before you start editing content, you might be interested in some background on why !-FitNesse-! has been built

| [[Project Death by Requirements][>ProjectDeathByRequirements]] | ''Why use automated acceptance tests? What goes wrong when we don't use them?'' |
| [[Acceptance Tests][>WritingAcceptanceTests]] | ''What are the advantages of ''!-FitNesse-!'' automated acceptance tests?'' |
| [[Acceptance Tests][>AcceptanceTests]] | ''What are the advantages of ''!-FitNesse-!'' automated acceptance tests?'' |
| [[Delivering the Right System][>DeliveringTheRightSystem]] | How Teams Can Use FitNesse: an Introduction |

Convinced? [[Download and install][http://fitnesse.org/FitNesseDownload]] on your machine, if you haven't done so already.
Expand Down
2 changes: 2 additions & 0 deletions FitNesseRoot/TemplateLibrary/content.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Here all the pages go that are available throughout the wiki.

Find out more on page .FitNesse.UserGuide.WritingAcceptanceTests.SpecialPages.

!contents -R2 -g -p -f -h
20 changes: 10 additions & 10 deletions FitNesseRoot/TemplateLibrary/properties.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<properties>
<Edit>true</Edit>
<Files>true</Files>
<Help>Base template library</Help>
<Properties>true</Properties>
<RecentChanges>true</RecentChanges>
<Refactor>true</Refactor>
<Search>true</Search>
<Versions>true</Versions>
<WhereUsed>true</WhereUsed>
<Edit>true</Edit>
<Files>true</Files>
<Help>Base template library</Help>
<Properties>true</Properties>
<RecentChanges>true</RecentChanges>
<Refactor>true</Refactor>
<Search>true</Search>
<Versions>true</Versions>
<WhereUsed>true</WhereUsed>
</properties>

0 comments on commit dc8ae3b

Please sign in to comment.