Skip to content

5. Running and Test Output

Chesko edited this page May 15, 2016 · 5 revisions

Attaching Your Tests

To get your tests into the game, create a new Quest in the Creation Kit. Give it a memorable name and press the OK button. Then, re-open the quest and uncheck the Start Game Enabled and Run Once boxes. Then, attach your test script to the quest. Save your plug-in.

Closing and re-opening the Quest after naming it prevents a Creation Kit crash.

Running Your Tests

To run your tests, just start the quest that has your Lilac test script attached via the console:

startquest MyTestQuest

Lilac prints the output of your tests to your Papyrus log. You must enable Papyrus logging to be able to see it.

When tests are passing, you will see SUCCESS next to each passed spec, along with a summary. The time next to each spec is how long it took to execute.

[05/14/2016 - 01:23:02PM] [Lilac] Starting Lilac 1.0 on [lilac_test <LilacTests (0A000D62)>]
[05/14/2016 - 01:23:02PM] [Lilac] Executed 1 SUCCESS (0.063000 secs)
[05/14/2016 - 01:23:02PM] [Lilac] Executed 2 SUCCESS (0.015000 secs)
[05/14/2016 - 01:23:02PM] [Lilac] Executed 3 SUCCESS (0.063000 secs)
[05/14/2016 - 01:23:02PM] [Lilac] Executed 4 SUCCESS (0.015999 secs)
[05/14/2016 - 01:23:02PM] [Lilac] Executed 5 SUCCESS (0.015000 secs)
[05/14/2016 - 01:23:02PM] [Lilac] Executed 6 SUCCESS (0.016001 secs)
[05/14/2016 - 01:23:02PM] [Lilac] Executed 7 SUCCESS (0.014999 secs)
[05/14/2016 - 01:23:02PM] [Lilac] Executed 8 SUCCESS (0.016001 secs)
[05/14/2016 - 01:23:02PM] [Lilac]   8 total  8 passed  0 failed

If a test fails, you will be given details of which specs failed and why. Apart from legibility of your test specs, this is why good descriptions in your suite describe and case it definitions are helpful.

[05/14/2016 - 01:23:02PM] [Lilac] Starting Lilac 1.0 on [lilac_test <LilacTests (0A000D62)>]
[05/14/2016 - 01:23:02PM] [Lilac] Executed 1 SUCCESS (0.063000 secs)
[05/14/2016 - 01:23:02PM] [Lilac] Executed 2 SUCCESS (0.015000 secs)
[05/14/2016 - 01:23:02PM] [Lilac] Executed 3 SUCCESS (0.063000 secs)
[05/14/2016 - 01:23:02PM] [Lilac] Executed 4 SUCCESS (0.015999 secs)
[05/14/2016 - 01:23:02PM] [Lilac] Executed 5 SUCCESS (0.015000 secs)
[05/14/2016 - 01:23:02PM] [Lilac] Executed 6 SUCCESS (0.016001 secs)
[05/14/2016 - 01:23:02PM] [Lilac] Executed 7 (1 FAILED) failed (0.031000 secs)
[05/14/2016 - 01:23:02PM] [Lilac] Executed 8 (2 FAILED) failed (0.032000 secs)
[05/14/2016 - 01:23:02PM] [Lilac] Failed Tests (first 128 failed test steps shown):
[05/14/2016 - 01:23:02PM] [Lilac]  - Quest Tests:
[05/14/2016 - 01:23:02PM] [Lilac]     - should make sure quest stage is above 50:
[05/14/2016 - 01:23:02PM] [Lilac]         - expected 20 to be greater than 50
[05/14/2016 - 01:23:02PM] [Lilac]     - should verify all messages:
[05/14/2016 - 01:23:02PM] [Lilac]         - expected the caek is a lie to contain cake
[05/14/2016 - 01:23:02PM] [Lilac]   8 total  6 passed  2 failed

Clone this wiki locally