<commit_before>!define TEST_SYSTEM {slim}
!2 The ''SLIM'' Test System

Slim (Simple List Invocation Method) is an alternative to Fit.  Rather than running all the HTML processing, comparisons, and colorizing in the System Under Test (SUT), Slim keeps all that behavior on in FitNesse.  What executes in the SUT is a very tiny kernel that implements the [[''Slim Protocol''][>SlimProtocol]].  This protocol is a bare bones RPC system that allows FitNesse to call functions in the SUT.

This strategy has a number of advantages:
 * The Slim protocol is very easy to port.  Getting new platforms to use SLIM is a matter of a few hours of work.
 * All the features are on the FitNesse side, so test tables remain consistent regardless of the platform of the SUT.
 * Since HTML is not an intrinsic part of SLIM, new test syntaxes can be explored.

!3 Using the SLIM Test System
If you want a test page to be run under SLIM, you simply set the TEST_SYSTEM variable to "slim" instead of "fit".  {{{&bang;define TEST_SYSTEM {slim} }}} If this variable is set on your page, (as it is on this page!) or on any parent page, then your page will be run with Slim.  That's all there is to it.

!3 The Slim Tables
The first cell of a slim table tells you what kind of table it is. Here are the table types so far:
|[[Decision Table][>DecisionTable]]|Supplies the inputs and outputs for decisions.  This is similar to the Fit Column Fixture|
|[[Query Table][>QueryTable]]|Supplies the expected results of a query.  This is similar to the Fit Row Fixture|
|[[Subset Query Table][>SubsetQueryTable]]|Supplies a subset of the expected results of a query.|
|[[Ordered query Table][>OrderedQueryTable]]|Supplies the expected results of a query.  The rows are expected to be in order.  This is similar to the Fit Row Fixture|
|[[Script Table][>ScriptTable]]|A series of actions and checks.  Similar to Do Fixture.|
|[[Table Table][>TableTable]]|Whatever you want it to be!|
|[[Import][>ImportTable]]|Add a path to the fixture search path.|
|[[Comment][>CommentTable]]|A table that does nothing.|
|[[Scenario Table][>ScenarioTable]]|A table that can be called from other tables.|
|[[Library Table][>LibraryTable]]|A table that installs fixtures available for all test pages|
|[[Define Table Type][>DefineTableType]]|A helper table that defines the default table type for named fixtures.|

!4 Data Types.
The data in your tables is all Strings.  However your fixtures don't want to be constrained to Strings.  So Slim comes with several standard data type converters that will automatically convert the strings in the tables into the data types expected by your fixtures.
!see >DataTypes.
You can also create your own custom type converters if you like.
!see >CustomTypes.

!4 Extra Goodies that are consistent throughout all Slim tables and ports.
|[[''Exception Handling''][>ExceptionHandling]]|
|[[''Symbols in tables''][>SymbolsInTables]]|
|[[''Constructor arguments''][>ConstructorArguments]]|
|[[''Value comparisons''][>ValueComparisons]]|
|[[''Graceful names''][>GracefulNames]]|

!4 New goodies

|[[''System Under Test''][>SystemUnderTest]]|

 <commit_msg>Documentation update on HTML content.<commit_after>!define TEST_SYSTEM {slim}
!2 The ''SLIM'' Test System
Slim (Simple List Invocation Method) is an alternative to Fit.  Rather than running all the HTML processing, comparisons, and colorizing in the System Under Test (SUT), Slim keeps all that behavior on in FitNesse.  What executes in the SUT is a very tiny kernel that implements the [[''Slim Protocol''][>SlimProtocol]].  This protocol is a bare bones RPC system that allows FitNesse to call functions in the SUT.

This strategy has a number of advantages:

 * The Slim protocol is very easy to port.  Getting new platforms to use SLIM is a matter of a few hours of work.
 * All the features are on the FitNesse side, so test tables remain consistent regardless of the platform of the SUT.
 * Since HTML is not an intrinsic part of SLIM, new test syntaxes can be explored.

!3 Using the SLIM Test System
If you want a test page to be run under SLIM, you simply set the TEST_SYSTEM variable to "slim" instead of "fit".{{{&bang;define TEST_SYSTEM {slim} }}}If this variable is set on your page, (as it is on this page!) or on any parent page, then your page will be run with Slim.  That's all there is to it.

!3 The Slim Tables
The first cell of a slim table tells you what kind of table it is. Here are the table types so far:

| [[Decision Table][>DecisionTable]] | Supplies the inputs and outputs for decisions.  This is similar to the Fit Column Fixture |
| [[Query Table][>QueryTable]] | Supplies the expected results of a query.  This is similar to the Fit Row Fixture |
| [[Subset Query Table][>SubsetQueryTable]] | Supplies a subset of the expected results of a query. |
| [[Ordered query Table][>OrderedQueryTable]] | Supplies the expected results of a query.  The rows are expected to be in order.  This is similar to the Fit Row Fixture |
| [[Script Table][>ScriptTable]] | A series of actions and checks.  Similar to Do Fixture. |
| [[Table Table][>TableTable]] | Whatever you want it to be! |
| [[Import][>ImportTable]] | Add a path to the fixture search path. |
| [[Comment][>CommentTable]] | A table that does nothing. |
| [[Scenario Table][>ScenarioTable]] | A table that can be called from other tables. |
| [[Library Table][>LibraryTable]] | A table that installs fixtures available for all test pages |
| [[Define Table Type][>DefineTableType]] | A helper table that defines the default table type for named fixtures. |

!4 Data Types.
The data in your tables is all Strings.  However your fixtures don't want to be constrained to Strings.  So Slim comes with several standard data type converters that will automatically convert the strings in the tables into the data types expected by your fixtures. 
!see >DataTypes

You can also create your own custom type converters if you like. 
!see >CustomTypes

Content returned from the SUT will be escaped by default, so your fixture can return a piece of output without the need to transform it to HTML compatible output. On the other hand, if you're returning HTML content (e.g. a <table>..</table>), !-FitNesse-! will try to detect that (based on a valid HTML start and end tag) and will render the HTML in-line.

!4 Extra Goodies that are consistent throughout all Slim tables and ports.
| [[''Exception Handling''][>ExceptionHandling]] |
| [[''Symbols in tables''][>SymbolsInTables]] |
| [[''Constructor arguments''][>ConstructorArguments]] |
| [[''Value comparisons''][>ValueComparisons]] |
| [[''Graceful names''][>GracefulNames]] |

!4 New goodies
| [[''System Under Test''][>SystemUnderTest]] |
{'fraction_non_alphanumeric': 0.08894517282479142, 'fraction_numerical': 0.0017878426698450535, 'mean_word_length': 4.767182130584192, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '971114', 'n_tokens_mistral': 1864, 'n_tokens_neox': 1824, 'n_words': 988}