Behavior Driven Development - process that helps everyone on the development team to have a shared understanding of software behavior
Gherkin - specification language
Cucumber - tool that understands Gherkin
BDD is good for
Manual tests
Smoke tests
Integration tests
Regression tests
End-to-end tests
BDD is not as good for:
Exploratory tests
Contract tests
Performance tests
Load tests
API tests
Note: Some overlap with API Testing Notes
“Test automation is most successful when there is collaboration amongst different team members: the product owners, business analysts, developers, testers, and of course automation engineers.”
Product owner / business analyst - help to decide which tests need to be automated
Developers - contribute unit tests, help update tests
Testers - manual testers are still needed! Not everything can or should be automated. They can also help with knowing which tests to automate
UI - at the top of the pyramid. Should have the least automated tests
Services - middle of pyramid. More automated tests than UI but less than Unit
Unit - bottom of the pyramid. Should have the most automated tests
Seams = shortcuts in application example: unique URLs
UI Locators - UI level tests need to access html elements
Unit & Services tests (functions) - write in the same language
Interaction = call functions
Services tests (APIs) - need to do HTML requests & responses
UI - need navigation library
Validation libraries - turn code into tests
Run tests in parallel to reduce time to complete
Clean coding - code reusability and maintainability.
Avoid:
excessive code duplication
long classes and methods,
inefficient waiting within tests
code smells
Design Patterns
Page Object Model
Screenplay
Fluent
Builder
Singleton
Factory
Facade
(These aren’t defined in the video)
Scaling Tests consider multiple:
environments
browsers
devices
Measuring return on investment. Benefits:
Shortened regress testing time
Fast and frequent feedback
Faster development time
Scalability
Why Use It?
Simple enough for non-programmers
Complex enough for programmers
User stories easier to understand
Scenarios should focus on behavior and not implementation.
Best Practices:
Steps should be information Independant
Connect scenarios to requirements
Combine common scenarios where possible
Make statements declarative, not imperative
Make steps modular
Keep general comments at the top of scenario
Given: the current state / prerequisites
When: the action taken
Then: resulting behavior
Example:
Given: a customer has an account
And account balance is $100
When: customer withdraws $10
Then: account balance should be $90
Used for version control, keeps track of history of project and allows multiple people to collaborate on software together
Git - actual version control software
Github - web service that runs git
Github repository - project, can’t have spaces in name
Commit - save a project
History - list of changes
Branches - different parallel versions of the same software
Push request - request to merge changes
Pull request - merging changes from one branch to the main branch
Sikuli can be used to automate Flash
-- KellieHeistand - 23 Jun 2020