What do you do when you have lots of free time on your hands? Why not learn test programming strategies and approaches?
When you’re looking for places to learn test programming, Test Automation University has you covered. From API testing through visual validation, you can hone your skills and learn new approaches on TAU.
We introduced five new TAU courses from April through June, and each of them can help you expand your knowledge, learn a new approach, and improve your craft as a test automation engineer. They are:
These courses add to the other three courses we introduced in January through March 2020:
- IntelliJ for Test Automation Engineers (3 hrs 41 min)
- Python Programming (2 hrs)
Each of these courses can give you a new set of skills.
Let’s look at each in a little detail.
“Appium is an open-source tool for automating native, web, and hybrid applications on different platforms.”
In the introduction, Orane describes the course parts:
- Setup and Dependencies — installing Appium and setting up your first project
- Working with elements by finding them, sending values, clicking, and submitting
- Creating sessions, changing screen orientations, and taking screenshots
- Timing, including TimeOuts and Implicit Waits
- Collecting attributes and data from an element
- Selecting and using element states
- Reviewing everything to make it all make sense
The first chapter, broken into five parts, gets your system ready for the rest of the course. You’ll download and install a Java Developer Kit, a stable version of Node.js, Android Studio and Emulator (for a mobile device emulator), Visual Studio Code for an IDE, Appium Server, and a sample Appium Android Package Kit. If you get into trouble, you can use the Test Automation University Slack channel to get help from Orane. Each subchapter contains the links to get to the proper software. Finally, Orane has you customize your configuration for the course project.
Chapter 2 deals with element and screen interactions for your app. You can find elements on the page, interact with those elements, and scroll the page to make other elements visible. Orane breaks the chapter into three distinct subchapters so you can become competent with each part of finding, scrolling, and interacting with the app. The quiz comes at the end of the third subchapter.
The remaining chapters each deal with specific bullets listed above: sessions and screen capture, timing, element attributes, and using element states. The final summary chapter ensures you have internalized the key takeaways from the course. Each of these chapters includes its own quiz.
When you complete this course successfully, you will have both a certificate of completion and the code infrastructure available on your system to start testing mobile apps using Appium.
Selenium WebDriver with Python
Andrew Knight, who blogs as The Automation Panda, teaches the course on Selenium WebDriver with Python. As Andrew points out, Python has become a popular language for test automation. If you don’t know Python at all, he points you to Jess Ingrassellino’s great course, Python for Test Programming, also on Test Automation University.
In the first chapter, Andrew has you write your first test. Not in Python, but in Gherkin. If you have never used Gherkin syntax, it helps you structure your tests in a pseudocode that you can translate into any language of your choice. Andrew points out that it’s important to write your tests steps before you write test code — and Gherkin makes this process straightforward.
The second chapter goes through setting up pytest, the test framework Andrew uses. He assumes you already have Python 3.8 installed. Depending on your machine, you may need to do some work (Macs come with Python 2.7.16 installed, which is old and won’t work. Andrew also goes through the pip package manager to install pipenv. He gives you a github link to his test code for the project. And, finally he creates a test using the Gherkin codes as comments to show you how a test actually runs in pytest.
In the third chapter, you set up Selenium Webdriver to work with specific browsers, then create your test fixture in pytest. Andrew reminds you to download the appropriate browser driver for the browser you want to test — for example chromedriver to drive Chrome and geckodriver to drive Firefox. Once you use pipenv to install Selenium, you begin your test fixture. One thing to remember is to call an explicit quit for your webdriver after a test.
Chapter 4 goes through page objects, and how you abstract page object details to simplify your test structure. Chapter 5 goes through element locator structures and how to use these in Python. And, in Chapter 6, Andrew goes through some common webdriver calls and how to use them in your tests. These first six chapters cover the basics of testing with Python and Selenium.
Now that you have the basics down, the final three chapters review some advanced ideas: testing with multiple browsers, handling race conditions, and running your tests in parallel. This course gives you specific skills around Python and Selenium on top of what you can get from the Python for Test Programming course.
Automated Visual Testing with Python
The next course we introduced was Gaurav Singh’s course, Automated Visual Testing with Python. In this course, Gaurav goes through the details of using Applitools — either replacing or alongside — coded assertions of web elements for application testing. If you have never used Applitools and you love Python, you will learn a lot about how to use visual validation through this course. An Applitools user will not learn python testing from Gaurav’s course — the Python for Test Programming serves that purpose much better — and then this course helps you with the Applitools syntax in Python. I posted a detailed review of Gaurav’s course in a separate blog post.
Introduction to NUnit
Brendan Connolly teaches Introduction to NUnit. NUnit provides a unit test framework for the .NET universe. It started off as a .net port of the jUnit framework for Java. NUnit allows you to write tests, execute them, and report results. If you’re coding in C#, F#, Visual Basic, or even C++, NUnit can help you write tests effectively.
I already went through the first chapter, which describes NUnit. In the second chapter, you install the .NET SDK. I’m on a Mac and figured I was stuck — but Brendan wrote his course from a Mac. You can use Homebrew to install the SDK. Once you have the SDK, you make sure you have a compatible IDE. You can use the community edition of Visual Studio, JetBrains Rider, or VS Code. Lastly in the chapter you set up your test environment.
In Chapter 3, you write your first test. I’m not a .NET person, but the code examples seemed quite similar to Java, so it was easy to follow along.
Brendan broke Chapter 4 into three parts: basic assertions, constraint model, and advanced options. Basic assertions, or classic model assertions, provide separate methods for evaluating that a single value, array, string, or collection possesses some property (Assert.IsEmpty, Assert.IsNotEmpty, etc.) or compares two or more and validates a comparison (Assert.AreEqual, Assert.IsGreater, etc.). The constraint model uses a single method, Assert.That, which receives the constraint to test as part of the parameters passed to it. The constraint model has become standard in NUnit because of its flexibility. Advanced options let you do things like run tests and report on conditions that are problematic but allow the test to continue running — so, instead of terminating a test on a first failure, the test will continue to run.
Chapters 5 and 6 go through structure and organization of your tests. Chapter 7 focuses on data-driven tests. Finally, Chapter 8 dives into test execution and reporting.
Overall, this course provides a great introduction into testing within your .NET environment.
For this course, knowing a programming language can help speed learning along. Students need to know how to use the command line to find and run files, as well as how to open, edit, and save text files.
The course will teach you how to:
- Recognize and create scripts
- Install Robot Framework and supporting tools
- Run tests
- Recognize and use keywords
- Drive web browsers with Selenium
- Create test cases
Because Robot Framework depends on scripting, you’ll spend a bit of time learning how to:
This course launched on June 26 on Test Automation University, and I look forward to taking it to learn Robot Framework.
IntelliJ for Test Automation Engineers
Corina Pip teaches this course on IntelliJ for Test Automation Engineers. This course makes sense for anyone asking,
“How does my approach and toolset compare with what other people do?”
Corina explains the details of using IntelliJ IDEA for test automation. The 12 chapter course takes 3 hours and 41 minutes to complete, and the course covers the full use of IntellJ IDEA. Her first five chapters involve setup and use of IntelliJ. These are:
At the end of these chapters, you have a good idea of where to find things in IntelliJ.
Then, Corina jumps into details about using IntelliJ for test and test automation:
- Create and edit tests
- Running tests
- Debugging tests
- Code analysis
- Version Control System integration
- Additional tips
- Updating and plugins
The course covers lots of detail. I think you will appreciate test contents in Chapters 6 and 7. Chapter 6 — create and edit tests, contains lots of critical testing tasks:
- Creating a package and test class
- Building the test methods
- Creating fields and variables
- Calling methods and jumping to source
- Auto import class reformat
- Renaming methods and variable
Chapter 7 also covers critical testing tasks, including:
- Running a package from the project screen
- Rerunning tests
- Running tests from the editor and configurations
- Pin, fixing tests and rerunning
By the time you get through Chapter 10, you’ll know how to link your tests back to your version controls system (Corina shows examples with Git, but you can use your favorite). The last chapters help you see how to use IntelliJ on an ongoing basis, as packages, add-ons, and the entire IDE receive updates periodically.
If you’re not using automation today, this course provides a great framework. If you are using another approach, Corina will give you some way to compare your results with what she does.
Do you want to learn test programming for behavior-driven development (BDD)?
Gavin’s first chapter covers BDD in detail. He covers the value of BDD to your organization:
In his second chapter, Gavin covers Gherkin — a syntax for describing a certain behavior. Each entry provides details for an example or scenario involving a specific feature and condition — followed by a Given/When/Then set of inputs and result (Given state, When input happens, Then act to create a specific result). This chapter contains the guts of the thought process for BDD. Spend time going through his examples, because the more richly you think things through and specify scenarios in Gherkin, the more likely you can create both usable and reusable code.
The third chapter covers Cucumber. Cucumber supports BDD and can execute Gherkin statements Gavin shows how you can use BDD and Cucumber — or misuse it — in your environment. Gavin lists out the skills you need for the rest of the course:
In the last three chapters, you actually use Cucumber to build tests. Chapter 4 shows you how to set up all the code you have installed. Chapter 5 runs through actual test scenarios. And, finally, Chapter 6 shows you how to add visual validation with Applitools.
Python for Test Automation
Yes, you could get a book. Or, you could take a class. And why take just a generic language class when you can learn Python for a specific use — like, say learn test programming with Python?
If you want to learn Python for test automation, take this course. In the end, you can read, understand, and review Python code. What’s more, you can read, write and understand unit tests, write scripts for different types of testing, create and modify Python/Selenium UI tests, understand security scans, and understand accessibility scans in Python.
Her course looks like a traditional programming course. In fact, if you read the titles of her chapters, you would wonder how it differs from any other language course. Especially in the last chapter, “Inheritance, Multiple Inheritance, and Polymorphism”, which you might think presents itself as just object-oriented detail. But, in fact, her focus on language helps you understand how you can use Python, or work with others who use Python, in your everyday testing.
Each of the chapters incorporates the idea that you might be testing some parts of the code. She incorporates examples as part of the course, so you can see how to create tests yourself — or how to read tests written by others.
While compact, this course covers key ideas in using Python — starting from installing Python and the Pycharm IDE to creating tests to account for inheritance, multiple inheritance, and polymorphism.
As I find myself with more time on my hands, I expect to take these courses really soon. And, I want to learn test programming skills.
I like the fact that I can learn Python for testing — rather than taking a general language course. I take my programming languages like foreign languages — I’d rather learn French so I can find the lavatory now, and explicate the poetry of Guy de Maupassant sometime in the future.
As a recovering product manager, I am looking forward to seeing how BDD helps developers take my product requirements and turn them into development and test code. So, I’ll make time for Gavin’s course soon.
And, finally, I love seeing how other people make use of the tools they prefer for testing, so I can’t wait to take Corina’s course.
For More Information
- Visit Test Automation University
- Learn Java Programming
- How Do I Validate Visually?
- Know The Answers, Get The Job
- Learning Appium Visual Testing on TAU
- Cutting-edge Functional UI Testing Techniques — Live Coding Webinar w/ Adam Carmi
- Request an Applitools demo.
- Sign up for a free Applitools account.
Originally published at https://applitools.com on July 10, 2020.