Skip to content

FitNesse

Use this section to write FitNesse wiki tests that drive the Reflex libraries (browser, REST, Excel, SSH and more).

A FitNesse test is a .wiki page. In the Reflex setup, the page does one thing: it runs a .lua file next to it. The Lua file calls the same libraries as every other Reflex script.

mytest.wiki

---
Test
---
|script |lua fixture |
|runFile;|Examples.Reflex.mytest |

mytest.lua

local browser = Sel.start()
browser.navigate("https://example.com")
browser.locator("id=submit").click()
browser.close()
return "Test completed"

You can also call library functions straight from wiki tables with fixtures. This suits quick, one-off checks. See Write tests.

Lua fileFixtures
Use forMost tests, loops, conditions, shared codeQuick inline checks
Logic in wikiNoneTables only

Start with Lua files. The test logic then stays in one place that you can reuse and run outside FitNesse.

  1. Install the fixtures: start a FitNesse project and add the fixtures.
  2. Suite setup: import the fixtures and set defaults.
  3. Write tests: wiki pages, Lua files and fixture tables.
  4. Examples: complete tests to copy.
  5. Dashboard: see results live.
  6. Fixture reference: every fixture method.