3pillarlabs/qa-automation-starter-sdk

Name: qa-automation-starter-sdk

Owner: 3Pillar Global Open Source

Owner: 3Pillar Global Open Source

Description: QA automation framework for browser, APIs and mobile apps. Easy to set up, simple to use and extend.

Created: 2018-02-08 17:10:37.0

Updated: 2018-03-16 02:19:53.0

Pushed: 2018-03-29 11:14:03.0

Homepage:

Size: 5416

Language: Java

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

QA Automation Starter SDK

Build Status Code Quality

This SDK provides common libraries and utilities for a test automation framework across web, APIs and mobile. There are two ways to use this SDK:

Highlights
Technology Stack
CI/CD
Structure

The SDK is a multi-module Java application.

d.gradle
ings.gradle
on/
c/
main/java
test/java

c/
main/java
test/java

c/
main/java
test/java
le/
c/
main/java
test/java
sample-app/
c/
main/java
test/java
sample-app/
c/
main/java
test/java
le-sample-app/
c/
test/java
Writing Tests

This is just an initial idea. In the actual implementation the test class may extend an abstract class or adhere to an interface.


ogin Tests

ic class LoginTest {

 inject page object
nject
ivate LoginPage loginPage;

est(dataProvider = "validUsers")
blic void successfulLogin(Set<User> users) {
for (User user : users) {
  loginPage.login(user);
}




age object for Login page

lic class LoginPage {

/ inject the WebDriver instance
Inject
rivate WebDriver webDriver;

/ inject other Page Objects
Inject
rivate DashboardPage dashboard;

/ declare the fields
PageElement(tag = By.ByName, value = "login.UserName")
rivate TextField userName;

PageElement(tag = By.ByName, value = "login.Password")
rivate TextField password;

PageElement(tag = By.ByTagName, value = "button")
rivate Button submit;

ublic DashboardPage login(User user) {
 try {
   userName.setText(user.getUserName());
   password.setText(user.getPassword());
   submit.click();
   return dashboard;
 } catch (WebException e) {
   logger.error(e.message, e);
   return this;
 }




Data provider

ic class UserDataProvider {

ataProvider(name = "validUsers")
blic static Object[][] validUsers() {
// Use the Data framework to fetch valid users



This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.