Moodle for mobile

Automated testing for plugins

Picture of Mark Johnson
Automated testing for plugins
Core developersParticularly helpful MoodlersPlugin developers

I was wondering if anyone had any thoughts about automated testing for plugins in the mobile app?  We can't just write behat tests since they want to talk to the Moodle site rather than the app.

The current extent of automated testing I'm doing involves PHPUnit tests that call the functions in my_plugin\output\mobile and test that the output contains the expected content.  However, it would be nice to test that things actually behave as expected in the app.

We'd need a way of having the app running in an automatable way (emulator? local ionic server? somthing else?) and a test framework for actually running the tests.  I've no experience doing this with mobile apps, although I can imagine you could hack about with behat to load the app running on a local ionic server and have some custom steps to do app-specific operations.

That was a bit of a stream of consciousness, I'm just interested to hear of anyone else had any thoughts on this.

Average of ratings: -
Picture of Dani Palou
Re: Automated testing for plugins
Core developersMoodle HQParticularly helpful MoodlersPlugin developers

Hi Mark,

we had some automated tests in the app with Ionic 1, but they broke when we migrated the framework (in fact we didn't even migrate the code). They seemed to work quite fine, although they were a bit unreliable (sometimes they failed when they shouldn't).

I guess we'll try to get them back sooner or later (right now we've too many things in our short term roadmap).



Average of ratings: -