0

I'd like to know if any of You have experience in automation UI testing of modular-like apps. The whole app is like all typical CRM-related apps, where based on Your personal client needs You just put together some of the available modules (that have been predefined earlier) in order to provide all necessary functionalities.

If there would be "static" app built of all these modules put together then we could test it in a quite easy way, just going through all defined test classes, because we would know the behaviour/interactions between all these modules.

But in case we would need to test app behaviour while putting some of its random pieces/modules together in order to check if they work well, we would need some other approach.

If there's a solution, some recommended architect pattern or anything that can help me to perform such automation tests (using i.e. Selenium WebDriver)? Or does this kind of tests are even possible to perform using WebDriver library?

I'd be grateful if You'll share any of Your thoughts and experiences in this area.

ArturS
  • 723
  • 1
  • 6
  • 19

2 Answers2

2

I am working in that area and had a similar situation, here's what I learned from it:

  1. Avoid creating UI tests if you can. UI tests are intended to test the look of your application and that's it. Business logic (like when I change that setting, the displayed data should change, etc.) should be tested in unit tests which are much easier to implement. Interaction between the modules should be covered as much as possible in integration tests.
  2. If you still have functionality left over that needs to be tested, create a config file that contains the information about what customer has which modules enabled. In your test, read that config and if a test is not supposed to run, abort it.
vatbub
  • 2,713
  • 18
  • 41
  • Thanks for Your response :) ! According to first lessons you've learnt, yes it'd be probably nice to cover app with unit tests, but it would need probably more developers effort, as I'm not familiar with app code, Your second advice seems to be quite a simple and nice solution, unfortunately in real life cases almost every developer that would run these kind of tests would prefferr to have a solution that wouldn't need to be configured previously, and that would just go with single click. – ArturS Sep 07 '18 at 06:40
  • In my experience, developing unit tests takes roughly the same effort as developing UI tests, but the quality benefit is much bigger. – vatbub Sep 07 '18 at 09:36
0

In case some further researcher will look for the know-how solution for this case, we can just set some different test suites for each of app modules, and then we can check each suits for some certain condition met. If some suit won't meet this condition then we'll just skip this test suites. I.e we can get the app bundles.json file, which will most likely contain all information concerning app modules, and then we can just process this file to search for modules which are unavailable in current deployed app.

Look this as nice reference on how to achieve this: Introducing to conditional test running in TestNG

ArturS
  • 723
  • 1
  • 6
  • 19