Blended Automation Framework "Tips, Tricks & Utils" ~Yagnesh Shah

https://yagnesh23.wordpress.com/pandoras-box/

Concepts

 Data-Driven & Hybrid

 Page Objects

 TestNg Annotations

 Multi Threading

  Parallel Execution

  Serial Execution

  Distributed Execution

 Modularized, Reusable & Maintainable Code & Data

 Dev-Process & Code Pre-Requisite

  Coordinate with Devs (For reliable locators):: Preferably, Id's for Web App, Content Description for Mobile App, or anything else of your choice

Tool Selection for Automation

http://www.moolya.com/blogs/2014/03/36/Blended-Automation--Part-1--App-vs-Tool-Assessment

 Web Automation :: App vs Tool Assessment

https://drive.google.com/file/d/0B4vikME7fgafYVBzOEdka1V0MVE/edit?pli=1

 Mobile Automation :: App vs Tool Assessment

https://drive.google.com/file/d/0B4vikME7fgafOFdWdzZ1VlNQUjA/edit?pli=1

 Flash Automation :: App vs Tool Assessment

https://drive.google.com/file/d/0B4vikME7fgafWkgxZGtZTUZ4Tzg/edit?pli=1

Script Arhitecture

 High level Scripts (a.k.a Test Cases)

  Less logic more method calls

  One script for each test case within a Feature

 Low Level Scripts (a.k.a Methods specific to AUT)

  Method definitions/logic

  One file for each feature & not test case

 Utils (a.k.a Methods specific to cross-products/projects)

  Web Common Methods

for Web Automation

  Mobile Common Methods

for Mobile Automation

  HTTP client utils for API automation

  Select Browser

for Web Automation

  Email

  TestNg report parser + Google Doc update for results on real-time basis

  DB Common Methods

Test Data

 Storage

  File Repositories

   XLS

   CSV

   XML, JSON

   DOC

  Database Repositories

   MySQL

   Others

 Retrieval

  Database

  Web Services

  APIs

Configs

.Properties file

 Select Browser

  Control to choose a Browser to execute all suites/tests

 Domain URL

  Control to choose a domain URL (Staging/QA/UAT/Production) to execute all suites/tests

 DB Domain

  If multiple DB's are present in a single server, then choose a DB to connect

 Email & TestNG Report parser & Google Update execution flag

  Flag to enable/disable Email & TestNg Report Parser

 Google Parser properties for updating test results on real time basis

  parserGoogleEmail

  parserGooglePassword

  parserIndexSpreadsheet

  parserIndexWorksheet

  parserInputFilePath

 Email properties

  emailSubject

  emailFromUser

  emailFromPassword

  emailToTotalCount

  emailTo0

  emailTo1

  . . .

  emailToN

  emailBodyMessage

  emailAttachment1Path

 suiteName

  Dynamic Suite Name for Email Subject

 Other Project Specific properties

Reporting

 Build.xml for Ant + TestNg + XSLT Report

 Test Automation Dashboard

 Use "Reporter.log("message",true)" from TestNg instead of "System.Out.Println()"

Harnessing power of Automation

 Make & Share Tools based on a prob/solution solved by us

 Be Smart :: Utilize Addon's & Tools available instead of making our own scripts

  Integrate Security Tools with WebDriver

   ZAP

   IronWasp

  Link Checker browser addon

  Others

Reference

 Pandora's Box

https://yagnesh23.wordpress.com/pandoras-box/

 App vs Tool Assessment for Automation

http://www.moolya.com/blogs/2014/03/36/Blended-Automation--Part-1--App-vs-Tool-Assessment

 Sample Project to Kick Start Web/Mobile Automation

https://github.com/YagneshShah/SeleniumLearnExploreContribute

 Utils Collection

https://github.com/YagneshShah/SeleniumLearnExploreContribute/tree/dev/seleniumWebdriverProjectTemplate/src/utils

 Build.xml for Ant + TestNg + XSLT

https://yagnesh23.wordpress.com/2014/09/01/build-xml-for-selenium-webdriver-ant-testng-xslt-automation-reporting-chapter-1/

 Test Automation Dashboard :: An open Source Tool from Moolya

http://www.moolya.com/blogs/2014/09/131/Test-Automation-Dashboard--An-open-source-tool