Lets cook some tests!
Green Field Projects
Brown Field Projects
Yes we know this ?
OK whats next ?
Full
Optimal
remoteflag = true
#BrowserStack Configuration
dc.platform = "Windows 8.1"
browsername="internet explorer"
dc.version="11.0"
remoteflag = "true"
host="ondemand.saucelabs.com"
port="80"
username = "Your username"
key = "yourkey"
remoteflag=True
host=192.168.88.142
port=4444
Text
public class TestClass{
Sassert sassert = new Sassert();
@Test(Data...)
public void testMethod(){
sassert.assertTrue(true,"this is test step1");
sassert.assertEqual(1,1,"verify if integers are equal");
sassert.assertAll();
}
Are you sure your automation scripts are working fine ?
retryfailedtestcase = 1
Irrespective of count Test cases are reported only once
Mapping.xml
TestData.xml
BrowserConfig.xml
We need to tell framework which browser and which data to be used
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Mapping [ <!ELEMENT Mapping (Package+)>
<!ATTLIST Package name CDATA #REQUIRED>
<!ATTLIST Package testData CDATA #IMPLIED>
<!ATTLIST Package clientEnvironment CDATA #IMPLIED>
<!ATTLIST Package runStrategy (Full|Optimal) #IMPLIED>
<!ELEMENT Package (Class*)>
<!ATTLIST Class name CDATA #REQUIRED>
<!ATTLIST Class clientEnvironment CDATA #IMPLIED>
<!ATTLIST Class testData CDATA #IMPLIED>
<!ATTLIST Class runStrategy (Full|Optimal) #IMPLIED>
<!ELEMENT Class (MethodName*)>
<!ATTLIST MethodName name CDATA #REQUIRED>
<!ATTLIST MethodName testData CDATA #IMPLIED>
<!ATTLIST MethodName clientEnvironment CDATA #IMPLIED>
<!ATTLIST MethodName runStrategy (Full|Optimal) #IMPLIED>]>
<Mapping>
<Package name="com.springer.test.datatest" testData="data/TestData_1.xml"
runStrategy="Optimal">
<Class name="com.springer.test.datatest.GoogleTest" clientEnvironment="browsers/FireFoxLocal.xml;browsers/ChromeLocal.xml">
<MethodName name="verifySeleniumTitle" testData="data/TestData_1.xml"/>
</Class>
</Package>
</Mapping>
CommandLine
ClientEnvironment
FrameworkProperties
mvn clean install -Dbrowsername=Firefox -Dremoteflag=true ......
All the configuration done in Browser Configuration or Framework.properties can be overriden by JVM argumnets
<ClientEnvironments>
<ClientEnvironment
dc.platform = "XP"
browsername="firefox"
dc.version="37.0"
remoteflag = "true"
host="ondemand.saucelabs.com"
port="80"
username = ""
key = ""
/>
<ClientEnvironment
dc.platform = "XP"
browsername="chrome"
dc.version="42.0"
remoteflag = "true"
host="hub.browserstack.com"
port="80"
username = ""
key = ""
/>
<ClientEnvironment
dc.platform = "Windows 8.1"
browsername="internet explorer"
dc.version="11.0"
remoteflag = "true"
host="ondemand.saucelabs.com"
port="80"
username = ""
key = ""
/>
</ClientEnvironments>
browsername - (FireFox|Chrome|IE|HTML)
remoteflag - Whether we want to run on Remote - remote can be HUB or BrowserStack
host - HUB host like (127.0.0.1) or cloud host like "hub.browserstack.com"
username - Username for Cloud
key - key for cloud
drivertimeOut - Integer value which is implicit wait for our driver
chromeserverpath - if remoteflag = false and browsername=Chrome , then location of Chrome Server
ieserverpath -if remoteflag = false and browsername=IE , then location of ieServer
screenshotflag - Boolean value to take screenshot of the failure test cases
highlightelementflag - utility to higlight clicking of element before clicking and entering text in webelement
#Any desired capability, it should be preceded with dc.
dc.platform=Windows
mvn clean install -DgoogleUserName=usergmail@gmail.com
-DgooglePassword=yourpasswd -DgoogleSheetName=sheetName -Denv-type=live
https://docs.google.com/spreadsheets/d/1KcK0UjhaANCigadSJxk71uPPuJsqvxBoatkop-e_wQM/edit?usp=sharing
Google Mapping
Google Browser Configuration
Google Test Data
As everything can be controlled by command line --> Easy CI integration
https://github.com/springer-opensource/omelet-dev-box
kapil.aggarwal1@gmail.com
http://springer-opensource.github.io/omelet/