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.
In the code editor window, you can edit the selected code.
- Click Save (a) to save the code file.
- Click Compile (b) to compile the code file. Compilation errors will appear in the Error List (c)
- 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:
- 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.
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.
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).
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