0

I am currently using webdriver to run tests on my website. The website is currently being run using IIS manager, so my tests run against the path: localhost/path/to/my/website.

The issue with this is if I want to have my tests run against the latest version of my website, I need to do a full build and redeploy of the site, which can take a long time. I was wondering if there was a way I could run webdriver against visual studio's emulator instead. The path to that usually ends up being localhost:(some port number)/(some URL), but I still need a way to start the emulator and run against the right port number.

To clarify, I'm running the tests from VS just fine. What I want to do is run the tests against VS's emulator. So I need a way to start the emulator before running the tests.

I was also able to find out that the website always runs with the host/port: http://localhost:62880/ So how all I need to know is how to start the emulator from WebDriver.

halfer
  • 19,824
  • 17
  • 99
  • 186
Mo H.
  • 1,788
  • 1
  • 18
  • 28

2 Answers2

1

I was able to find this solution.

The basic idea is to publish your website locally to a non-source controlled folder (this is done by modifying the project), then use IIS Express to run the website on a given port.

halfer
  • 19,824
  • 17
  • 99
  • 186
Mo H.
  • 1,788
  • 1
  • 18
  • 28
0

I believe once you have the test assembly build you can run them on NUnit Console. I usually copy the bin directory and drag and drop the dll on NUnit Console.

enter image description here

Having said that I am not entirely sure how to run vs emulator on a static port all the time. This may help.

Community
  • 1
  • 1
Saifur
  • 16,081
  • 6
  • 49
  • 73
  • 1
    Hey, thanks for the reply. Running the tests isnt really an issue, I'm running the tests from VS just fine. What i want to do is run the tests against VS's emulator. So I need a way to start the emulator before running the tests. The static port answer does help though. – Mo H. Mar 23 '15 at 15:07