Running NUnit Tests in VS Mac 2017

Please excuse me if this is the wrong place to ask this question as im new to the Mac expereince.

I understand that VS for Mac is a totally different beast to VS in windows, but im struggling to run my NUnit Web Driver tests within the mac version. We recently developed both iOS and Android Apps for our company, so purchaced a Mac for dev and testing purposes. However we also have a web driver project in C# that i've brought over to the Mac (thinking I can work from home on one machine). This is where my problems have arisen.

The project loaded fine, all the packages were installed and I can write the test fine. The issue is running them. I can run a test from the Unit Test window fine. The test will pass or fail but then thats it. The option to run is then greyed out for all tests. It's like the programme is waiting for me to do something. The windows version simply lets you right click and Run, test passes, test fails, you stop test, right click run. Rinse and repeat.

I've look everywhere and am hoping this is a noob question that someone laughs at but ultimatly can solve for me.

Thanks in advance
Stu

Best Answer

Answers

  • mattwardmattward GBMember Xamurai

    So you run the tests the once and then you cannot run them again since VS Mac still thinks they are running? It sounds like the tests or test runner are still running. On Windows you say you have to stop test and then run them again. You should be able to do the same thing on VS Mac by clicking the red stop button in the Unit Tests window or by clicking the Square stop button in the main toolbar.

  • StuCheeStuChee GBMember

    Hi Matt, Sorry I should of put this in my origonal post. The tests will finish and my first thought was what you have said. I assumed that something was still running, so i pressed the stop button. Nothing seems to happen when I do this. Another thing I've noticed is that when the Units Tests pass, they go green. Fail they go red, but no matter the outcome, the top level goes purple. Not sure if this is an idicator to whats happening.

    Thanks for your reply as its driving me mental.

  • StuCheeStuChee GBMember

    Right I see, in windows the driver.Close(); command would close the browser and finish the test. I'm guessing i'll need to add a teardown into the tests to reslove this?

    Thanks for all your help on this so far.

Sign In or Register to comment.