Skip to main content

Running Automated Testing Locally

Step 1

  • Clone Utopia to your local device (either with Tortoise GIT or through Visual Studio)
  • Clone UtopiaAutomation to your local device (either with Tortoise GIT or through Visual Studio)

Step 2

  • Open two instances of Visual Studio, one with the Utopia.sln solution, and the other with UtopiaAutomation.sln

Step 3

  • Run the Microsoft Azure Storage Emulator which is located on your laptop.

Step 4

  • In the Utopia.sln, right click Utopia then select "Set as Start Up Project"
    • 'Utopia' will be selected in Visual Studio's project pulldown, and 'IIS Express' will be showing in Visual Studio's run pulldown
    • Click on the green arrow next to 'IIS Express'
    • Rubex will start running on localhost in a new browser instance
    • Note: If you do not see the pulldown objects listed above go to View/Toolbars/ and click on 'Standard'

Step 5

  • In testSettings.json (located in the VS instance with UtopiaAutomation.sln), locate the lines that control the end-point to be tested. Simply uncomment the lines associated with the end-point you want to test. To test locally:
    • Uncomment the line "targetUrl": "https://localhost:44334/ ",
    • Uncomment the line "storageType": 0,
    • Comment all of the other lines with end-points
    • Comment the line "storageType": 1,
  • Finally, you can now run Automated Tests against your local instance of Rubex by taking the second instance of Visual Studio with UtopiaAutomation.sln and finding the Test Explorer then running any test by hitting play within the Test Explorer

Troubleshooting

  • On occasion the Rubex database includes changes which need to be applied to your local storage. You will know this because an error message will be displayed when attempting to run Rubex or a test. Apply the changes by running DbMigratorEF.
    • Select DbMigratorEF from the project pulldown
    • Click the green start arrow
    • A Windows command window will pop up showing progress
    • When prompted, hit the Enter key to update to the latest database
    • Close the window
    • Select Utopia from the project pulldown and relaunch IIS Express