Test Scenario Preparations should be done via API wherever possible, rather than via UI
I think this is best explained by an example: Say, I need to test the Wiki functionality (of any gitlab Project). For this, I need to first create a Group, and then a Project and then start testing the actual scenario: create wiki/edit/wiki, etc.
-
I would rather prefer to do the Group and Project creation via API rather than via UI (because we are NOT testing the Group/Project creation here, our aim here is to test Wiki. Also, there are dedicated tests to validate Group/Project functionality)
-
Also, the logging in/out for each of the tests, its again time-consuming as well. I would rather have one test dedicated to test the Login Scenarios and for other tests, we can have a hidden URL or some kind of a test hook (can brainstorm on how to do it.) which would work only on the internal testing domains and localhosts, maybe.
I think both the above suggestions would reduce the test suite runtime. Thoughts?