With modern software development moving at a rapid pace, automation engineers may find it difficult to keep up with frequent changes. Incorporating parts of the testing process into everyone's workflow, this creates the potential for automated testing to mirror software delivery.
Description: With modern software development moving at a rapid pace, automation engineers may find it difficult to keep up with frequent changes. But if parts of the testing process are incorporated into everyone's workflow, this creates the potential for automated testing to mirror software delivery. My goal is to make software testing more accessible to entire product and engineering teams by providing familiar tools that allow individuals to easily contribute to the automation process. For this talk, I will explore how we can meet developers halfway by using the javascript-based testing framework WebdriverIO, demonstrate how product managers can create living documentation and test cases using Cucumber, and talk about sharing page objects and testing libraries across multiple services using NPM.
Code Examples:
https://github.com/dcypherthis/gtr-test-cucumber
https://github.com/dcypherthis/gtr-test-mocha-bdd
https://github.com/dcypherthis/gtr-test-xray
7. QUALITY AS PART OF THE DELIVERY PROCESS
• Test at each development stage
• Unit test ALL THE THINGS
• Identify boundaries between services
• Test for behavior, not just function
• Keep Exploring
12. Cucumber
WHAT
+ BDD Framework for writing plain-english
statements and mapping them to test code
+ Built around Given, When & Then
statements that make up the Gherkin
syntax
+ Features describe Value propositions
+ Scenarios evaluate Expectations
WHO
+ Business People
WHY
+ Produces Contextual Errors
+ Describes Customer Intentions
15. Selenium
WHAT
+ Tool for automating web application testing by
sending commands to Native Browser API's
+ Self-contained Library that is Framework-Agnostic
+ Supports Multiple Browsers, Proxies, & Devices
WHY
+ Provide a Friendly API to help write and maintain
tests
+ Bring Modularity & Realism to the testing
experience
HOW
+ Sends actionable commands to the browser and
returns data used for making assertions via the
JSON Wire Protocol
17. Cucumber...SALAD
+ Cucumber draws relationships between
Gherkin Statements & Step Definitions
+ Test code Lives in the step definitions at it's
highest level
REGEX SUPPORT
+ Cucumber supports parameterization
through Regular Expressions
+ We can leverage regex to create a few very
Abstract step definitions that power many
variations of tests
23. The Page Object Pattern
+ CSS selectors can often change in test code, Breaking all of our automation
+ We place these selectors and functions in domain-specific page objects that are
shared across the Global Scope
+ We can instantiate page objects as needed for efficiency
ANOTHER LEVEL OF ABSTRACTION
+ The page objects become the API that interacts with the user interface
+ One change to a single selector is fixed in One Place
+ Pages can Inherit, Extend, or work in Isolation of one another
27. NPM Install your-test-library
HOW
+ Wrap all your page objects, test data, utility classes, etc in a Publishable Package
+ Treat this code like Production code
+ Push updates to the library when the front-end changes.
+ Document and treat this like any public-facing API
WHY
+ Test with Whatever, Wherever
+ Have a single source of truth for ALL your testing needs.
+ Get developers involved in the process
30. WILL IT BLEND?
PUTTING IT ALL TOGETHER
+ We test specifics from the Gherkin layer
+ Step definitions support multiple parameters by
leveraging regex
+ Page Objects are instantiated one at a time
through dependency injection
+ Assertions are only made at the Step definition
level
+ Page objects live a completely decoupled
"testing library"