How to do Cucumber Android integration testing?

I am trying to set up continuous integration with an Android project and Cucumber.

The idea is to write tests in Cucumber and run tests on my Android device through Cuke4Duke and NativeDriver for Android.

When I start this project, I plan to use Maven and the Jenkins server to automate testing, so it starts every time I submit the Subversion repository.

Has this been done before? Is there a good guide somewhere? Or is it a bad idea to do it this way?

+6
source share
4 answers

We do exactly what you plan to do with Maven, Jenkins and Git. The missing component is the android / cucumber integration from lesspainful.com .

+2
source

I do not think that what you have planned is a bad idea. But I do not know anyone who makes Android CI with this particular setting.

You can also take a look at Robotium as Selenium for Android, and it offers a very rich DSL that will help you implement your cuke4duke steps.

0
source

In my company, we use a slightly different setting (but probably you will have to solve similar problems): Jenkins + Jenkins Android Plugin + Robotium + Ant. We find that ant is hard to support when you try to use it in something more complex than a simple build, and we rewrite our scripts on gradle.

This works very well, but you should be aware of two potential problems: 1. The emulator is slow (even on a fast server) - you may consider connecting a physical device to your server. 2. You may have to configure the lock (or use only one artist) for the emulator, since using multiple instances of the emulator is complicated / complex.

0
source

What we have done is to write test tools for Robotium. This engine is mainly a means of reading keywords from a text file and converting them into Robotium API calls. We initially noticed that the inputs and outputs were the same: user clicks on the screen, a new screen is displayed, or new text is displayed.

This allows us to implement keyword testing, but it runs on the device, so it is not deleted.

This is 20% of the effort to get 80% of the benefits: it is easy to write / add new tests that can be read by anyone. Of course, there are limitations, but our goal has been achieved.

Cheers Ch

0
source

Source: https://habr.com/ru/post/896637/


All Articles