Take a look at Knowledge Administration And Dependencies
That is sometimes the 2nd main problem in automation. As soon as the group is satisfied of the worth of automated exams the subsequent problem is information administration.
In all of the organizations that I’ve labored in, the identical challenges comes up – dependencies for authentication, authorization and the particular artifacts wanted within the product, corresponding to account, website, group, and many others. It’s solved otherwise for handbook testing the place both the person registers every time as a part of the testing or the group establishes take a look at accounts with entry often arrange as soon as after which used repeatedly going ahead.
Automation for take a look at circumstances which have dependencies corresponding to authentication, authorization and different artifacts creation require new approaches which can be solely related to automation.
Thus the method for testing ‘after a typical login’ – or different ‘setup’ actions are complicated for automation.
Listed below are a number of the choices:
- Mocking and stubbing for the authentication or code that depends on it
- Scripts that do logins utilizing the UI
- Everlasting accounts used for take a look at automation circumstances solely
- Accounts which can be created by means of an API particularly for testing
My suggestion is mocking and stubbing and/or the flexibility to create or use accounts particularly for automation. This may be categorized as gray field testing, the place you do not know the internals however you do have acceptable hooks for testing functions.
One side you’ll want to grasp shouldn’t be solely creating, however deleting the artifacts as soon as the particular take a look at has run. With out this automation you’ll quickly create 1000’s of artifacts and that may turn into an issue. Just like artifacts creation, you will need to do that by means of API calls and never by utilizing the UI which is sluggish and unreliable.
My least favored choice is creating the account by means of the UI, e.g. the login exams. UI automation is sluggish, usually does not scale and all the time has components of flakiness and thus ought to be averted as a dependency for working different automation. It is going to steadily work OK for the primary couple of take a look at circumstances however then as you scale testing with extra circumstances it sometimes breaks down with flaky failures and sluggish suggestions from the take a look at suite.