This is part three of of a seven-part blog series. Care to go back to the beginning?
INTERLUDE: Overheard at my workplace...
"Now, type on the next line, Capital-D, DesiredCapabilities, one word! Then space, the word 'caps', space, equals sign, the word 'new', Capital-D DesiredCapabilities, one word! Open-parentheses, then close-parentheses, semi-colon.
"... On the right side of the equation, we just declared a new instance of the class DesiredCapabilities, part of the Selenium WebDriver library. To the left of the equation, we are placing that value in a variable we are calling "caps", and declaring that also to be of type DesiredCapabilities...
"... Why is the word DesiredCapabilities underlined in red in our editor? We haven't imported the library into our 'Smoketest.java' class. On the MacBook, it is CTRL+Enter to import. Press those keys at the same time right after you see the DesiredCapability IntelliJ tooltip. That is IntelliJ IDEA's 'Intellisense' feature..."
So far, I have spent two half-hour pair-programming sessions attempting to train a manual tester on my team how to do automation development. It's not exactly the blind-leading-the-blind, but it is pretty darned close.
I've only been doing automation development
for the past two years, hopping around from Selenium WebDriver + Java
at Fitbit, Nightwatch Js + JavaScript + NodeJs
for a few months at Good Start Genetics. And I only have been teaching myself Appium since March since I signed up for this six month contract at Stop & Shop's parent company, where we are designing the next generation of mobile apps for Stop & Shop, Giant Food, and Martin's.
I have been working really hard to prove my worth over the past three months as a contractor:
- Checking to see if we can used a favored automation tool used at this company, SerenityBDD, for mobile apps. (Answer? There really isn't that much documentation or support on it).
- Exploring Appium Desktop, using that as a teaching tool to explain setting up an Appium environment
- Putting together the basic Appium framework
My latest pet project is seeing if through one-on-one training I can get a manual testers to be able to design their first automated test, then add it to my basic test framework in a pull request... all in just ten half-hour sessions.
One roadblock, besides the fact I only started teaching myself Appium + Java in March when I was hired for this contract position? I can't shake this cold I caught two weeks ago, and I keep on losing my voice. My voice is a bullfrog croak and end up shouting in my trainee's ear too loudly as I try to excitedly improvise a lesson for my first test subject, a former SysAdmin who now is a manual tester on our project. He has some tinkering in Java, but not much.
"Okay -- brace yourself! This next code block will contain a lot of typing..."
Rule Number One: Trainees have to type everything out. Every semi-colon. Every statement. Every code block.
Rule Number Two: No wizards except the first one to set up the initial project. I walked him through creating a new Gradle + Java project with IntelliJ IDEA with the New Project Wizard. How to create a new directory off of the root directory called "src". How to create a sub-directory called "test". And another one called "java".
Rule Number Three: Trainees have to do their own searching. Do we need to import a new Java library into our project? I tell the trainee to Google the word "Maven Repository". I describe to him how to go to and search the
Mvnrepository.com site for a third party dependency for Appium's Java-Client library. I tell him to copy-and-paste the code from the "Gradle" tab and back into our build.gradle file, in the 'Dependencies' code block.
Rule Number Four: I saw on Twitter recently this question by a beginning programmer:
- Is it okay to copy-and-paste code?
- To copy? Yes. To paste? No.
... I am trying to have the trainee follow this dictum.
... Okay, enough about work. Let's get back to learning about DesiredCapabilities, where we match the Appium Server that is running with the Android emulator that is running. Three questions though...