Creating a Unit Test Project

After you enable recording and set the recording mode, you must create a test case in a Unit Test Project. A test case is a collection of test steps and is saved with the .smtest file extension. The transactions executed at runtime are recorded as a series of test steps in a SMTest file. Test steps are listed in the order they are recorded and indicate the type of transactions that were performed at runtime. Refer to Transaction Types for more information on the types of transactions that can be recorded.

Unit Test Project

A System Modeler Test Project is a test solution that holds the recorded and playback test cases. A Unit Test Project can contain multiple recorded and playback test cases. The Unit Test Project is listed in Solution Explorer. It is recommended that you create a new test solution when you start recording for the first time.

To create a new Unit Test Project in Microsoft Visual Studio, perform the following:

  1. Click File > New > Project…

  2. From the left pane, select Test from the Visual C# project types in the Add New Project window.

    Note: System Modeler supports only the C# unit test project types.

  3. In the New Project dialog box, select .NET Framework 4.8 from the drop-down list or you can change the Target Framework field after the unit test project is created. Refer to Step 7 to set the .NET Framework after the unit test project is created.

    Note: You need to set the .NET Framework to 4.8 for the current application to ensure that ATT works correctly.

  4. Select Unit Test Project.

  5. In the Name box, enter a project name.

    This is the .sln solution file used to hold all the tests. The Location field is automatically populated.

  6. Click OK.

    A Unit Test Project is created.

To change the .NET Framework after the Unit Test Project is created, right-click the Unit Test Project, select Properties, and modify the Target Framework field to .NET Framework 4.8.