简体   繁体   中英

How I do I automate Xamarin.iOS unit test project

How I do I automate Xamarin.iOS unit test project.

For Android, I found this link which worked fine.

https://developer.xamarin.com/guides/android/troubleshooting/questions/automate-android-nunit-test/

Is there any references like this for Xamarin.iOS too?

At the time of writing this, I don't believe what you'd like to do is possible. If I take your meaning, you'd probably like to say "Run All" with some test runner (presumably in XS or VS) and then get the results immediately, but that's not how it works with Xamarin.iOS. I'm sure you've already glanced at Xamarin's iOS testing quick-start, but if not here that is .

You have to set up a Unit Test app that uses the Touch.Unit framework, fire up the test app, and "touch" the tests you'd like to run. My experience doing this has not been so great. The runner itself seems buggy and you're limited with in what other tools you can use (eg, mocking frameworks won't work, assertions made with Shouldly won't register). I guess it's better than nothing, though!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM