Enabling TrueLog

For new Silk4NET scripts, TrueLog is enabled by default. You can enable or disable TrueLog by checking or un-checking the Enable TrueLog check box in the TrueLog tab of the Script Options dialog box. To open the Script Options dialog box, click Silk4NET > Edit Options.

To enable TrueLog for existing Silk4NET scripts, which are using the Visual Studio Unit Testing Framework, you have to replace the TestClass attribute of all test classes in the script with the SilkTestClass attribute.

To enable TrueLog for existing Silk4NET scripts:

  1. Open the script that contains the test class for which you want to enable TrueLog.
  2. Add the SilkTestClass attribute to the test class.

By default, the TrueLog is created in the TestResults sub-directory of the directory, in which the Visual Studio solution file and the results of the Visual Studio Unit Testing Framework are located. To specify a different location for the TrueLog, click Silk4NET > Edit Options to open the Script Options dialog box and click Browse to the right of the TrueLog file field.

The Visual Studio solution file is the file in which the Silk4NET scripts are located. When the Silk4NET test execution is complete, a dialog box opens, and you can click Explore Results to review the TrueLog for the completed test.

Examples

To enable TrueLog for a class in a Visual Basic script, use the following code:
<SilkTestClass()> Public Class MyTestClass
  <TestMethod()> Public Sub MyTest()
    ' my test code
  End Sub
End Sub
To enable TrueLog for a class in a C# script, use the following code:
[SilkTestClass]
public class MyTestClass {
  [TestMethod]
  public void MyTest() {
    // my test code
  }
}