Automation Hackathon @ STG 2016

Our mission is to build quality, efficient and cutting edge software solutions for our clients while building strong, well-rounded careers for our employees.

29 November 2016 alan.monson@stgconsulting.com Comments Off on Automation Hackathon @ STG 2016 General Software Development

by Matt Chiang
 
“Learning never exhausts the mind.”

-Leonardo da Vinci


@STG this year, we stayed engaged in learning during the summer by doing a series of automation code challenges.  The code challenges were simple at first and then get more difficult.  Some concepts were easy to grasp.  Others were more difficult.  However, in the end everyone learned.  STG is opening up the code challenge to everyone who wants to participate.  You are welcome to use any programming language or framework you want.  Some frameworks/languages will be easier to implement than others and some will have more capabilities than others.

To submit your work, go to the Contact Us page and submit your GitHub repository along with your contact info.  Make sure you make your project public so our engineers can review your code submissions.  Each code challenge is worth one entry that will be held at the end of December for prizes (Backpacks, Messenger Bags, Apple TVs, Amazon Gift Cards, Camping/Emergency lanterns).  We will contact the winners in January 2017.

You are also welcome to contact me through LinkedIn for help and for code submissions. 

A grand prize will be given to the first person to complete and turn in all 8 challenges.


Here are the code challenges:

AUTOMATION CHALLENGE 1 (GO TO A SITE):
Write a method that will navigate me to any site I want to go to and verify the site is the correct site.

Here are the steps for your automation:
1.  Go to https://www.skiutah.com
2.  Have your automation get the name out of the <title> tag.


AUTOMATION CHALLENGE 2 (NAVIGATION MENU CLASS):
Write a class that will allow me to navigate the main pages on the site.

1. Go to https://www.skiutah.com
2. If you click on Stories, it goes to the Stories page.
3. Remember to make this a class/method that will accept a string value of the menu I want to navigate to and not something that is static.

Sample stub code:

@test
public void automation 1(){
    siteName = “https://www.skiutah.com“;
    validationString = “Ski Utah”;
    navigateTo = “Deals”;
    AssertTrue (goToPage(navigateTo, validationString));
}


AUTOMATION CHALLENGE 3 (NAVIGATION SUB MENU CLASS):
This is an extension of the previous challenge.  Write a class that will allow me to navigate the sub pages w/in the menu on the site.

1. Go to https://www.skiutah.com

2. If hover over the main menu items, you’ll see the hover event and see the sub menus.  Some items in the menu has sub menus and some don’t.

3. Write a method that will allow me to navigate to the sub menu by triggering the hover event and then clicking on the item in the sub menu that I want to navigate to.


AUTOMATION CHALLENGE 4 (GET INFO):
Write a method to return the time each ski resort is from the Airport.

1. Go to https://www.skiutah.com/
2. Click on the link that is on the home page to compare resorts.
3. The method should be able to return a time based on the name of the ski resort that I want to pass in.  You can return the value either w/ a string or int.

@test
public void automation1(){
    System.out.println(timeFromAirport(airportName)) 
}


AUTOMATION CHALLENGE 5 (USE SEARCH AND GET INFO):
1. Go to https://www.skiutah.com/members/listing
2. Write a method that will allow me to pass in 3 string parameters (What, By Resort, Sub Category)
3. Return the list of the search results by looking ListingResults-item


AUTOMATION CHALLENGE 6 (CRAWLER):
Write a crawler that will automatically navigate to every page on the site.

1. Go to https://www.skiutah.com/
2. Build a crawler that will start at www.skiutah.com and finds every link/page and goes to that page and finds other pages it needs to visit.  Remember to not visit the same page twice and to only visit the pages on the domain.


AUTOMATION CHALLENGE 7 (CRAWLER AND GET TEXT):
Extension of last project.  Use the crawler and catalog every word used and the number of instance each word occurs.

1. Go to https://www.skiutah.com/
2. Use the crawler written in the past challenges and write a method to keep track of all the words on each page on the site and return to me a list or dictionary of words that exists on the site.  Also send me the list or dictionary in a text document.


AUTOMATION CHALLENGE 8 (CRAWLER AND IMAGE VERIFICATION):
Extension of the crawler challenge.  As you navigate through the site, find every broken image.

1. Go to https://www.skiutah.com/
2. Verify that each reference to an image displays the image correctly and not a dead image.

Tags: