Skip to content

Exercise 3 Run Your First Test

cjayswal edited this page Nov 9, 2016 · 2 revisions

Exercise 3 Run Your First Test

In this Exercise, we will do required run configuration and run the test on chrome browser.

Configure your run

Download ChormeDriver

You can download it from here

Set Application properties

open application.properties file and set following properties

env.baseurl=http://www.google.com/
driver.name=chromeDriver
webdriver.chrome.driver=<location_of_chromedriver>

Create XML Configuration file

Create/open testrun_config.xml under config directory

Configuration file to run BDD tests

<suite name="QAF Example" verbose="0">
	<test name="BDD Test">
		<classes>
			<class name="com.qmetry.qaf.automation.step.client.text.BDDTestFactory" />
		</classes>
	</test>
</suite>

Configuration file to run Java tests

<suite name="QAF Example" verbose="0">
	<test name="JAVA Test">
		<packages>
			<package name="qaf.example.tests" />
		</packages>
	</test>
</suite>

Run your test

Right click build.xml and run as ant build. You also can right click xml configuration file and run as 'TestNG Suite'

See Report

Open dashboard.htm in Firefox.

References

  1. List of properties
  2. Setting Properies
  3. How to use driver
  4. QAF Reporting
  5. XML configuration file