Today when we have a problem with our webdriver.io tests, we change the log level on the webdriver.io log and get more information from webdriver.io. When we been working on the upgrade to v8 in T324766 we have had problem that tests works on our machines but not on CI and the logs on that low level gives us to much information.
I think adding logs to our own page tests would make sense. I'll make an example and then we can discuss it from there.
I think the implementation would be in two steps:
- Add wdio/logger as a dependency to our core tests and add a logging function to our base page.
- Make our core tests more defensive, so that if we get an error within the test (we can not click on an element or an element do not exist or whatever) we log that as an error with our own error message. The good thing about this is that by following a structure, our logs can help us point out exactly what fails. I think this makes more sense and can make is move faster.
Let me do a couple if concrete examples that we can discuss.