samedi 8 juillet 2017

Launching android emulator using specflow

I'm trying to use specflow to create automated testing for a Xamarin project in Visual Studio 2017. I've created a project which uses Nunit and specflow and created a feature file. I've seen it's possible to start a iPhone and do some automated testing, but I'm having problems on how to do this with android. I've read this BDD Test with xamarin where, as I understand, I should add this:

 public static IApp StartApp(Platform platform, string simulator)
    {
        if (platform == Platform.Android)
        {
            return ConfigureApp
                .Android                   
                .StartApp();
        }

        return ConfigureApp
            .iOS
            .StartApp();
    }

However I cannot figure out how this will help me launch the simulator, and what I should pass as the string to start an android simulator.

Aucun commentaire:

Enregistrer un commentaire