Automation Hackathon @ STG 2016/2017

Posted by on Feb 15, 2017 in General Software Development | No Comments

Author: 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 gets 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 (http://stgconsulting.com/contact/) and submit your github repository along w/ your contact info.  Make sure you make your project is public so our engineers can review your code submissions.  Each code challenge is worth one entry that will be held at the end of February for prizes (Backpacks, Messenger Bags, Apple TVs, Amazon Gift Cards, Camping/Emergency lanterns).  We will contact the winners in March 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’s 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’s 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.

Go to https://www.skiutah.com

If you click on Stories, it goes to the Stories page.

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 SubMenu 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.

Go to https://www.skiutah.com

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

Write a method that will allow me to navigate to the submenu by triggering the hover event and then clicking on the item in the submenu 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.

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

click on the link that is on the home page to compare resorts.

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)

Go to https://www.skiutah.com/members/listingWrite a method that will allow me to pass in 3 string parameters (What, By Resort, Sub Category)

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.

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

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.
Go to https://www.skiutah.com/

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.

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

Verify that each reference to an image displays the image correctly and not a dead image.
 
Author: Matt Chiang