In this automation best practices workshop you will learn the latest and greatest tools and techniques to drastically improve your testing!
We will focus on a holistic approach of risk mitigation by doing:
- functional web testing,
- visual testing,
- accessibility testing,
- and many other things in between 😁
This workshop serves 2 purposes
- For me to give back to the testing world and help us all upskill 🚀
- For us all to help a greater cause than ourselves 🌍
Code.org® is a nonprofit dedicated to expanding access to computer science in schools and increasing participation by young women and students from other underrepresented groups. Their vision is that every student in every school has the opportunity to learn computer science as part of their core K-12 education. The leading provider of K-12 computer science curriculum in the largest school districts in the United States, Code.org also created the annual Hour of Code campaign, which has engaged more than 15% of all students in the world.
Working together, we can reduce the digital divide!
With the Testing for Good event, we're helping to give every student the opportunity to learn computer science — online and in schools where Code.org will establish permanent courses and train teachers. For every dollar you donate, one child will be introduced to computer science.
To make your donations go even further, Sauce Labs will match up to $2,500.
👇👇👇
Please donate whatever you feel appropriate. 100% of the donations go to the cause.
- Create a framework for doing comprehensive web testing
- Use industry-standard best practices
- Create functional browser tests using Selenium
- Code visual e2e tests using Screener
- Run in massive parallel (100s of tests in < 5 min)
- Automatically get robust test reports with logs + videos
- Sauce Labs
- Selenium
- Sauce Visual
- Github Actions
- Java
- Maven
- Introduction to workshop
- Local environment setup
- E2E browser tests
- Atomic tests
- Visual e2e tests
- Parallelization
- Conclusions
This is NOT a beginners course and you will not learn Java testing fundamentals here. However, you will learn a number of amazing skills, techniques, and tools to help you test web applications
- At least 1 year of Java programming
- Deep understanding of Selenium WebDriver
- Deep understanding of OOP
- Java 8 installed
- Java IDE installed
- Git
- Maven installed
- 🔭 I’m the founder of Ultimate QA
- 🏢 I’m a Sr Solutions Architect at Sauce Labs
- 🌱 I’m currently working on Sauce Bindings
- 💬 Ask me about environmentalism, veganism, test automation, and fitness
- 😄 Pronouns: he/him
- ⚡ Fun fact: I'm a vegan that's super pasionate about saving the planet, saving animals, and helping underpriveleged communities
- 📫 Follow me for testing and dev training
💻Join Slack #help-desk for tech support
- Free Sauce account
- Request Demo Secreener account. !You must request this at least a week before the workshop as it's a manual process to add users.
- Save your Sauce Labs Username and Access Key by going to the Sauce Labs user settings page
- Save your Screener API Key by going to the API key page in your Screener settings
- Need to sign up for demo account before
💻Join Slack #help-desk for tech support
Fork then clone the repo
- Sign up for a free GitHub account
- Fork this repository
- Make sure you are logged into GitHub
- Click the Fork in the upper right of the GitHub.
- Clone your fork of the repository to your machine. Must have Git installed
git clone URL_OF_YOUR_FORK
Setup environment variables on your system
Navigate to the directory of where you cloned your repo
cd YOUR_FORK_DIR/automation-best-practices/workshop
Run sanity tests
mvn test -Dtest=SanityTest -X
Click here to see an example console output.
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 54.305 sec
Results :
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 56.063 s
[INFO] Finished at: 2021-11-03T16:03:20-04:00
[INFO] ------------------------------------------------------------------------
If you weren't successful at setting up you local env, then use the Gitpod approach👇
ℹ️ Optional Bonus
- Follow Codacy instructions to setup static code analysis for your first repo
- Adding and analyzing takes a bit
- Configure code patterns for the repo
💻Join Slack #help-desk for tech support
ℹ️ Gitpod lets you run an entire Dev environment from a browser! You can use this approach if you don't know how to setup a local Java environment.
-
Sign up for a free GitHub account
-
Fork this repository
- Make sure you are logged into GitHub
- Click the fork in the upper right of GitHub
- Select your username as the location to fork the repo
-
In the browser address bar, prepend the GitHub url (
https://github.com/USERNAME/automation-best-practices-java
) withhttps://gitpod.io/#
-
The resulting url should look as follows:
https://gitpod.io/#https://github.com/USERNAME/automation-best-practices-java
-
-
Once the Gitpod.io URL is loaded, you will need to sign in with the GitHub account you created earlier
-
Once the development environment is loaded, you should see 'Ready to test!' in the Terminal window in the lower portion of the window, run the following commands in that Terminal to set your
SAUCE_USERNAME
,SAUCE_ACCESS_KEY
, andSCREENER_API_KEY
:
ℹ️ You can get your Sauce Labs Username and Access Key by going to the Sauce Labs user settings page
ℹ️ You can get your Screener API Key by going to the API key page in your Screener settings
eval $(gp env -e SAUCE_USERNAME=<sauce_username>)
eval $(gp env -e SAUCE_ACCESS_KEY=<sauce_access_key>)
eval $(gp env -e SCREENER_API_KEY=<screener_api_key>)
Replace <sauce_username>, <sauce_access_key>, and <screener_api_key> with your credentials
Once you have run those 3 commands, you can run the following commands to test your environment variables:
echo $SAUCE_USERNAME
echo $SAUCE_ACCESS_KEY
echo $SCREENER_API_KEY
Run sanity tests
mvn test -Dtest=SanityTest -X
Click here to see an example console output.
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 54.305 sec
Results :
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 56.063 s
[INFO] Finished at: 2021-11-03T16:03:20-04:00
[INFO] ------------------------------------------------------------------------
Stay to the end and 2 lucky people can win a snazzy Back Pack!
💡 this is a tip
🏋️♀️ this is an exercise for you to do
❓ this is a question for us to think and talk about. Try not to scroll beyond this question before we discuss