Casey Cantwell Test Talks

Today we’ll be Test Talking with Casey Cantwell a Senior QA Architect about WebDriver.io Automation. This episode came about after I received an email from Casey who asked “In reading your blog post on “frameworks you need to know article” I was surprised to see a framework based on Node.js didn’t get any love in your article. We chose Webdriver.IO as our product is all Node.js / JavaScript and are loving it.” So I asked Casey if he would be open to being interviewed about his experiences with creating Node.js based automation frameworks. So that what will be test talking all about today.

About Casey Cantwell

Casey Cantwell
Casey Cantwell is Software Quality Assurance professional with 18 years experience testing and leading QA teams for large J2EE enterprise Applications. He is a proponent of agile methodology, continuous process improvement, automation technologies, and an avid listener of test talks.

Quotes & Insights from this Test Talk with Casey Cantwell

  • When I started this company I was given a period of time to do a POC where I was able to evaluate different technologies and different tools knowing that ultimately I wanted to build an automation strategy that was going to allow us to release code after we finished a sprint. So our goal is we have a sprint we develop stories and when that sprint to the finish. We want to be able to promote that code to production with a high level of quality and in a very short period of time. So we needed an automation framework that we could build that was going to be flexible, it needed to be cost-effective, it needed to be very maintainable it needed to have fantastic reporting. And most importantly we needed an automation framework that we could put into our CI/CD pipelines.
  • One of the challenges that we had in developing automation is it was because of the technology stack that our platform is being built on. So our technology stack for the platform is Node.js on the backend javascript, HTML and CSS in the front end. And specifically, we're using a technology called polymer web components and lit element on the front end which has shadow DOMS in that technology. And what's interesting about the technology stack that I'm having to automate against is that selenium by default does not support shadow Dom.
  • The reason we chose WebDriver.io specifically is that our development stack was primarily javascript. Our development team their full stack developers all developing in JavaScript so it naturally led us to wouldn't it make the most sense to also have an automation architecture and framework in the same language that our developers are developing in.
  • To be honest my POCs is we're not very successful when I was trying to automate against Web Components using polymer. A lot of the traditional play and record tools couldn't find an element because our elements were hidden within a shadow. And that posed a real challenge for us. And then some tools that we were evaluating they didn't support Safari or they only supported Chrome. One of our criteria was that it needed to have wide adoption against the things that we needed to support.
  • WebDriver.io is our test runner. And we had to develop the classes to support the ability to get those elements. So we're using on page objects. So every page, every component, every view everything has its own class inside our automation framework. So at the highest level, we can say app. this object and then the framework will return to that object. But most importantly that objects selector path will be set up to be its parent's selector your path plus your current selector path.
  • The one actual advice that I have for folks that are working in an automation framework is to really consider your test scripts and how you're abstracting them. Everyone's goal should be to not have duplicated code or copy code and you want to be able to abstract tests in a certain way that you can take a lot of that duplicated code out.

Connect with Casey Cantwell

Automation Guild 2019 Ad

Rate and Review TestTalks

Thanks again for listening to the show. If it has helped you in any way, shape or form, please share it using the social media buttons you see on the page. Additionally, reviews for the podcast on iTunes are extremely helpful and greatly appreciated! They do matter in the rankings of the show and I read each and every one of them.
SponsoredBySauceLabs

Powered By SauceLabs

Test Talks is sponsored by the fantastic folks at Sauce Labs. Try it for free today!