2017 Hackathon

Posted by on Nov 27, 2017 in QA, Scripted Technologies | No Comments

By: Matt Chiang 

As many of you know, automation is a great skill/asset to have. However, building automation is only part of the solution to checking code for problems. There are many other supporting technologies that goes into putting a usable solution together so that the automation doesn’t have to run your local machine and consume the time you would otherwise be manually or doing adhoc testing.

Here’s the challenges this hackathon will help us learn and figure out.

  1. How to launch the automation w/o an IDE or from your local machine. headless automation maybe?
  2. How to write reusable tests. Object oriented programming principles and
  3. How to build data driven automation tests.
  4. How to make QA transparent so that others can run the tests.
  5. Learn mobile automation.
  6. Learn how to control elements using drag and click.
  7. How to increase our velocity to run 33 tests in a matter of a couple of minutes.
  8. How to build 1 test that will test 33 different data sets using IE, chrome, and FF w/o having to write 99 separate tests. If we apply this to mobile (Android using Chrome), that would mean 132 tests total. Writing one tests will make the automation maintainable.
  9. How to build a solution so that one can see historical trends of each test and each time it ran and which browser it was ran on. In today’s agile environment of deploying often and testing often, these tests might be ran once or ten times a day. If they are ran after new code is deployed and the test is triggered, how do we check for failures w/o having to watch the tests run? This could be a web app that gathers all the data and the automation sends the test status or any info to the web app for it to parse and display. At the end of the data, one person can go view the results.
  10. For the advanced requirements, building tools that facilitates the solution. This could be another webapp to allow business analysts, project managers, your kids, or your parents to modify the data and to run the tests.
  11. For the web app for reporting, add in filtering or searching so that you can easily narrow in on a specific test or result you want to see.

 

Here’s the site/web app we are going to build a solution around.

 

https://www.nuskin.com/content/nuskin/en_BE/ageloc-me-assessment.html

This version of the web app for the Belgium market. If you look at the CountryURL column in the spreadsheet, it will give you the starting point of where the web app is for every market.

The background of this app is a single page app that allows people to customize a lotion that fits their skin type. The levels of chemicals in each formulation can make you look younger, or have no effect. It’s an app that I have already automated w/ a solution around it to do regression testing on desktop web and mobile. If you build the automation so that it’s reusable and generic enough, you should be able to use the same code on the web and mobile and only have to change one line of code. Also, if you build your code to be reusable, you only have to write 1 test and scale it to verify 33 different variations across the world markets.

The attached xls spreadsheet is the data you will be using to test and to verify pass/fail. The data should drive your tests and values for each option / scale for which the code need to emulate to that you can verify the correct assessment code w/ the correct formulation based on what the user is wanting.

The age column is the numeric value entered on the page asking for age.

Gender, skintype, aha, firmness, radiance, texture, dayfragrance, and nightfragrance, data controls which button needs to be clicked.

Ethnicity is a link.

Location is used for text search for the location page.

Pollution, environment, sensitivity, agespots, wrinkles, wrinklesnose, wrinklesforedead, and pore, are on a 1 to 100 scale to control the slider on the various pages.

The OriginalAssessment is the code that will be generated based on the data that is used to run the tests.

You’ll also see a DateChanged and a NewAssessment column.

These are used to store your data when you tests completes. If the code isn’t the same, the new code needs to be logged into the NewAssessment column and DateChanged is the current timestamp for when the test detected the change. If the code is the same, then nothing needs to be stored in the spreadsheet. This will solve the problem if basic test reporting.

Here’s a list of the requirements:

Basic Requirements

  1. Use the Page Object Model in the framework (PageFactory and @FindBy annotations)
  2. Use collections such as Lists for related WebElements
  3. Load data provider info into a Map
  4. Multi-language support

Functionality Requirements

  1. Ability to automate locations other than the app’s GPS auto-locate
  2. Implement drag and drop functionality for the slider dials using percentages
  3. Use just one test class that dynamically handles different test data
  4. Be able to automate and handle several types of moisturizer choices and handle relevant modal windows that may be called

Optional Requirements:

  1. Run spell checking (Agreement TOS, etc.)
  2. Save assessment summary to a document

Advanced Requirements:

  1. Integration w/ build system (Ant, Jenkins, etc)
  2. multi threading automation. (automation code itself, use of Docker, grid, etc).
  3. reporting of historical tests and general trends for pass/fail (use of built in test reporting is fine but it doesn’t really show results from test to test w/o manually opening the report).
  4. web based data provider (restful web service, database, etc).
  5. web interface so that any end user could manipulate the test data and run the tests. Make this a point/click/run.
  6. mobile automation on android (remote, local, multithreaded testing).

For those who want to focus only on the automation portion, here’s the list of things to help you break down the challenge:

 

Challenge #1

Begin an automation framework for testing the Single Page App (SPA) located at, https://www.nuskin.com/content/nuskin/en_US/ageloc-me-assessment.html#/you-start by automating the acceptance of the license agreement. Automate the input of a name, age and gender, ethnicity, and a non-GPS specified location as well.

 

Challenge #2

Automate the selection dial to move in percentages, automate the first dial entitled, “Chemical Exposure” to move 70% (High Exposure).

 

Challenge #3

Complete the automation of the entire app, to the end of the assessment. Be sure to automate for handling of all the possible modal pop-ups shown for Day Moisturizer and Night Moisturizer dial selections.

 

Challenge #4

Modify the automation to run successfully in 2 different mobile device types (e.g., iPad and Samsung Galaxy S4) using the Chrome Mobile Emulation through the ChromeDriver capabilities.

 

Challenge #5

Modify the automation to utilize the first line of test data given through the data provider, an Excel Spreadsheet (provided). Incorporate the use of collections (lists, maps, etc.) to store the data provider information for the tests.

 

Challenge #6

Enable framework to run language-independent, with the ability to run the tests successfully in any language specified through the data provider.

 

Challenge #7

Integrate the automated framework into a build manager (Ant, Maven, Gradle) and run the tests on a Continuous Integration Server such as Jenkins or Hudson.

 

Challenge #8

Enable a multi-threaded execution of the tests listed in the data provider. Run the tests in multiple browsers using Selenium Grid. (Optional/Extra Credit: Run the tests in Selenium Grid using multiple Docker containers).

 

We are going to do this a teams and include developers and QA engineers. You are welcome to invite family, friends, classmates to be on your team. You might also want team members from different disciplines to help w/ different areas of this solution. Front end dev can your team build the front end of the reporting app, c#/java/php/etc dev can help build the controller for the web app, DBA and help you build the models where the data is stored and optimize search queries. They don’t have to primarily focus on automation. However, it’s up to your team. The teams can be anywhere in the world to build out the solution. There’s plenty of online tools to help w/ collaboration, communication, and task management.

Here’s a list of the free ones that can be used.

https://pinup.com and http://scrumblr.ca can help you build your agile board of tasks. The boards sticks around for a while. I tried out both by creating a test board and adding items and even after a week, I can still see my board w/ all the tasks.

https://codeshare.io/ can help you collaborate w/ other team members so they can help you debug.

https://ideone.com/ is another good place as well.

Github is a great place to store your code.

 

You can also use https://slack.com/ or https://trello.com/. Use whatever that will make your team successful.

To get you everyone started, you can go to this URL and start building your teams and or start planning and breaking down the work.

http://scrumblr.ca/stghackathon

We will announce when the hackathon is posted in our blog on http://stgconsulting.com/blog/

We will run the hackathon for 4 weeks and judging will commence mid December. We’ll have judges grade the solutions based on “easy of use”, “amount of requirements solved”, “most unique solution”, “fastest to run/get results”.

Winning team will have recognition on STG’s site forever and each team will walk away w/ a digital portfolio you can show others.