Help and hints

Igor Manushin edited this page Jul 23, 2014 · 3 revisions

This article is based on the Parsing example. Please use code from that articles or prepare to replace the function names.

By default, QA Engineer see FitNesse only without any .Net code which was wrote by developers. In case of that it is too hard to understand the API, because the code QA Engineer is unable to read and understand C# code.

In case of that NetRunner have ability to transfer help from C# code to the FitNesse web view. Originally FitNesse does not have any help support, e.g. it is unable to have help pages in the FitNesse which will be refreshed automatically. Therefore, NetRunner help addition is the only hack which can simplify test creation. However, let's finish the advertising and create help.

Add simple C# help to our function:

/// <summary>
/// Function adds task for the target user
/// </summary>
/// <param name="user">The user who will have this task</param>
/// <param name="startDate">Task start date</param>
/// <param name="title">Task title</param>
public void AddTaskForWithStartDayAndTitle( User user, Date startDate, string title )
{
    /*strong work*/
}
Now let's configure out project to generate the default .Net XML help:
  1. Open the project properties
  2. Select Build menu
  3. Find Xml Documentation File checkbox and enable it. Then checks that result xml file is near with result dll file. NetRunner fill find dll file and will try to find related xml documentation file by replacing file extension from dll to xml: for the file "myLibrary.dll" the file "myLibrary.xml" will be used for documentation purpose.
  4. Build your project
  5. Verify that .Net xml file is near the result dll file
  6. Execute test from the previous article.
First help item is on the top of the page. Expand Engine Information part. You will see all your test containers with links. Try to open one of them to see complex function reference. Then try to hover mouse to the function Add Task .... You will see hints on the web page.

You can try to use different htmls tags in the your help. Some of tags (such as script) are disabled. However, tags p, br and some others are fully supported.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.