StresStimulus has a built-in .NET code editor for creating and editing internal scriptable variables and components. The following section describes how to use the code editor and the features it has.

Tabbed editor

Starting from v5.5, the code editor will no longer open as a popup window, but rather a tab on the right. This allows for multiple code file editing simultaneously and access to UI elements during coding.

Code Editor

In the code editor window, you can edit the selected code.

  1. Click Save (a) to save the code file.
  2. Click Compile (b) to compile the code file. Compilation errors will appear in the Error List (c)
  3. After the code compiles, click Save & Exit (d) to save the code and exit the editor.

Reference other assemblies

By default, when compiling the scriptable variable, the following assemblies are referenced:

  • System
  • System.Xml
  • System.Data
  • System.Core
  • StresStimulus.Core (or StresStimulus.Core.Fiddler if using Fiddler addon version)

If the scriptable variable requires other assemblies, then they must be referenced in the code editor.

GAC assembly

If the required assembly is part of the .NET Framework (located the GAC), click Add GAC (a) button on the reference pane to bring up the Select GAC assembly to reference dialog. Tick the checkbox beside the desired assemblies to reference and click the OK button.

Other assemblies

To reference a non-GAC assembly, click the Add (b) button on the reference pane to bring up the select file dialog. Select the .dll file of the desired assembly to reference and click OK. 

The assembly will be referenced, and the selected .dll file (along with associated .pdb and .xml files if they exist) will be copied to the same folder as the scriptable variable source (the Scripts subfolder of the test).

Exception handling

If a runtime exception occurs during the test, the exception will be caught and logged in the test log in either a scriptable variable or component. If using scriptable variables or components, it is recommended to verify with the trace log option enabled to reduce the chances of a test runtime exception.


  • No labels