Skip to content

IronPython-based utilities for testing via the WatiN framework

License

Notifications You must be signed in to change notification settings

Wombatpm/IronWatin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

IronWatin

The basic notion behind IronWatin is to use the flexibilty provided by IronPython and the testing power that WatiN provides for integration testing on Windows (not yet tested on Mac OS X or Linux via Mono).

Status

Currently IronWatin is quite basic in its implementation, providing a basic BrowserTest class which subclasses from the unittest.TestCase class provided by the standard unittest Python module.

Usage

IronWatin is intended on being used from a single-runner perspective, i.e.:

#!/usr/bin/env ipy

# The import of IronWatin will add a reference to WatiN.Core.dll
# and update `sys.path` to include C:\Python25\Lib and C:\Python26\Lib
# so you can import from the Python standard library
import IronWatin

import WatiN.Core as Watin

class MyTest(IronWatin.BrowserTest):
	url = 'http://www.github.com'

	def runTest(self):
		# Run some Watin commands

if __name__ == '__main__':
	IronWatin.main()

You can also add your own custom command-line parameters which will be added to every instance of your test cases, i.e.:

#!/usr/bin/env ipy

# The import of IronWatin will add a reference to WatiN.Core.dll
# and update `sys.path` to include C:\Python25\Lib and C:\Python26\Lib
# so you can import from the Python standard library
import IronWatin

import WatiN.Core as Watin
import optparse

class OptionTest(IronWatin.BrowserTest):
	url = 'http://www.github.com'

	def runTest(self):
		# Run some Watin commands
		assert self.testval

if __name__ == '__main__':
	opts = optparse.OptionParser()
	opts.add_option('--testval', dest='testval', help='Specify a value')
	IronWatin.main(options=opts)

About

IronPython-based utilities for testing via the WatiN framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published