sebaslogen / CleanGUITestArchitecture

Sample project of Android GUI test automation using Espresso, Cucumber and the Page Object Pattern
MIT License
137 stars 31 forks source link

Is multiple ActivityInstrumentationTestCase2 possible to run under this setup? #5

Closed cooperkong closed 8 years ago

cooperkong commented 8 years ago

Hi

Thanks for the great example, really appreciated! Just wondering if you have experienced working with multiple ActivityInstrumentationTestCase2 tests. Because later the StepDef might grow to couple hundreds lines easily with all scenarios.

In your case, what if there more screens after welcome screen, how are you going to handle that? Can they still work under this setup?

Thanks.

sebaslogen commented 8 years ago

Yes, it's a good idea to split tests in different feature files. The cucumber plugin support this and it just works in this example.

For cucumber there is no distinction between putting the tests on the same file or different files, so remember to add tags to filter tests in the future.

El jue., 21 de abr. de 2016 15:32, WenChao Kong notifications@github.com escribió:

Hi

Thanks for the great example, really appreciated! Just wondering if you have experienced working with multiple feature files. Can they still work under this setup?

Thanks.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/neoranga55/CleanGUITestArchitecture/issues/5

sebaslogen commented 8 years ago

The answer above is for the original question about feature files.

Using multiple instrumentation classes is not possible in the current setup. Indeed the step definitions file grows so to avoid having a mess there I follow these guidelines:

Good luck

El jue., 21 de abr. de 2016 15:32, WenChao Kong notifications@github.com escribió:

Hi

Thanks for the great example, really appreciated! Just wondering if you have experienced working with multiple feature files. Can they still work under this setup?

Thanks.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/neoranga55/CleanGUITestArchitecture/issues/5

cooperkong commented 8 years ago

Thanks for the useful tips 👍 I think the idea to group related sentences into single reusable/meaningful sentences is really important. These kind of steps should not depend on actual scenarios. For example: see "text", click on "btnName"