public class Selenified extends Object
Modifier and Type | Field and Description |
---|---|
protected ThreadLocal<App> |
apps |
protected ThreadLocal<Browser> |
browser |
protected static List<Browser> |
browsers |
protected ThreadLocal<Call> |
calls |
protected static List<org.openqa.selenium.remote.DesiredCapabilities> |
capabilities |
protected ThreadLocal<org.openqa.selenium.remote.DesiredCapabilities> |
capability |
protected static org.openqa.selenium.remote.DesiredCapabilities |
extraCapabilities |
protected ThreadLocal<OutputFile> |
files |
protected static String |
servicesPass |
protected static String |
servicesUser |
Constructor and Description |
---|
Selenified() |
Modifier and Type | Method and Description |
---|---|
protected void |
beforeSuite()
Runs once before any of the tests run, to parse and setup the static
passed information such as browsers, proxy, hub, etc
|
protected void |
endTest(Object[] dataProvider,
Method method,
org.testng.ITestContext test,
org.testng.ITestResult result)
After each test is completed, the test is closed out, and the test
counter is incremented
|
protected void |
finish()
Concludes each test case.
|
protected void |
finish(int errors)
Concludes each test case.
|
protected String |
getAuthor(String clazz,
org.testng.ITestContext context)
Obtains the author of the current test suite being executed.
|
String |
getTestSite(String clazz,
org.testng.ITestContext context)
Obtains the application under test, as a URL.
|
protected String |
getVersion(String clazz,
org.testng.ITestContext context)
Obtains the version of the current test suite being executed.
|
protected static void |
setAuthor(Selenified clazz,
org.testng.ITestContext context,
String author)
Sets the author of the current test suite being executed.
|
protected static void |
setTestSite(Selenified clazz,
org.testng.ITestContext context,
String siteURL)
Sets the URL of the application under test.
|
protected static void |
setVersion(Selenified clazz,
org.testng.ITestContext context,
String version)
Sets the version of the current test suite being executed.
|
protected void |
startTest(Object[] dataProvider,
Method method,
org.testng.ITestContext test,
org.testng.ITestResult result)
Before any tests run, setup the logging and test details.
|
protected void |
startTest(Object[] dataProvider,
Method method,
org.testng.ITestContext test,
org.testng.ITestResult result,
DriverSetup selenium)
Gathers all of the testing information, and setup up the logging.
|
protected static String servicesUser
protected static String servicesPass
protected static org.openqa.selenium.remote.DesiredCapabilities extraCapabilities
protected static List<org.openqa.selenium.remote.DesiredCapabilities> capabilities
protected ThreadLocal<Browser> browser
protected ThreadLocal<org.openqa.selenium.remote.DesiredCapabilities> capability
protected ThreadLocal<OutputFile> files
protected ThreadLocal<App> apps
protected ThreadLocal<Call> calls
public String getTestSite(String clazz, org.testng.ITestContext context)
clazz
- - the test suite class, used for making threadsafe storage of
application, allowing suites to have independent applications
under test, run at the same timecontext
- - the TestNG context associated with the test suite, used for
storing app url informationprotected static void setTestSite(Selenified clazz, org.testng.ITestContext context, String siteURL)
clazz
- - the test suite class, used for making threadsafe storage of
application, allowing suites to have independent applications
under test, run at the same timecontext
- - the TestNG context associated with the test suite, used for
storing app url informationsiteURL
- - the URL of the application under testprotected String getVersion(String clazz, org.testng.ITestContext context)
clazz
- - the test suite class, used for making threadsafe storage of
application, allowing suites to have independent applications
under test, run at the same timecontext
- - the TestNG context associated with the test suite, used for
storing app url informationprotected static void setVersion(Selenified clazz, org.testng.ITestContext context, String version)
clazz
- - the test suite class, used for making threadsafe storage of
application, allowing suites to have independent applications
under test, run at the same timecontext
- - the TestNG context associated with the test suite, used for
storing app url informationversion
- - the version of the test suiteprotected String getAuthor(String clazz, org.testng.ITestContext context)
clazz
- - the test suite class, used for making threadsafe storage of
application, allowing suites to have independent applications
under test, run at the same timecontext
- - the TestNG context associated with the test suite, used for
storing app url informationprotected static void setAuthor(Selenified clazz, org.testng.ITestContext context, String author)
clazz
- - the test suite class, used for making threadsafe storage of
application, allowing suites to have independent applications
under test, run at the same timecontext
- - the TestNG context associated with the test suite, used for
storing app url informationauthor
- - the author of the test suiteprotected void beforeSuite() throws InvalidBrowserException
InvalidBrowserException
- If a browser that is not one specified in the
Selenium.Browser class is used, this exception will be thrownprotected void startTest(Object[] dataProvider, Method method, org.testng.ITestContext test, org.testng.ITestResult result)
dataProvider
- - any objects that are being passed to the tests to loop
through as variablesmethod
- - what is the method that is being run. the test name will be
extracted from thistest
- - was the is context associated with this test suite. suite
information will be extracted from thisresult
- - where are the test results stored. browser information will
be kept hereprotected void startTest(Object[] dataProvider, Method method, org.testng.ITestContext test, org.testng.ITestResult result, DriverSetup selenium)
dataProvider
- - any objects that are being passed to the tests to loop
through as variablesmethod
- - what is the method that is being run. the test name will be
extracted from thistest
- - was the is context associated with this test suite. suite
information will be extracted from thisresult
- - where are the test results stored. browser information will
be kept hereselenium
- - is this a selenium test. if so, the webdriver content will
be setupprotected void endTest(Object[] dataProvider, Method method, org.testng.ITestContext test, org.testng.ITestResult result)
dataProvider
- - any objects that are being passed to the tests to loop
through as variablesmethod
- - what is the method that is being run. the test name will be
extracted from thistest
- - was the is context associated with this test suite. suite
information will be extracted from thisresult
- - where are the test results stored. browser information will
be kept hereprotected void finish()
protected void finish(int errors)
errors
- - number of expected errors from the testCopyright © 2017. All rights reserved.