user1822116
user1822116

Reputation: 21

Automation tool for testing python code and javascript

Does anyone know any free automation testing tool for unit testing python code and javascript?

Upvotes: 2

Views: 2876

Answers (3)

Try using https://replit.com its a web based IDE for python

Upvotes: 0

William
William

Reputation: 6428

You will likely want to compose a number of testing frameworks together. Our team uses nose http://code.google.com/p/python-nose/ as pointed out by @Arbie.

We use nose to also run selenium http://seleniumhq.org/ tests with the python driver which is really the only way I know of to effectively test javascript that manipulates the DOM. Although I have high hopes for WebDriver as part of selenium 2 once it stabilizes. While using selenium we've had to Monkey Patch the python driver to make it more pythonic. Wrapping the python-selenium driver so it changes:

selenium.doCommand('waitForElementPresent', 'selector')

into:

selenium.wait_for_element_present('selector')

You can then use nose and selenium to run QUnit http://docs.jquery.com/Qunit if you want to just test base javascript functions that don't necessarily change the DOM.

Example selenium integration:

def setUp(self):
    self.test_url = "http://your_domain"
    self.selenium = selenium("localhost", 4444, "*firefox3", self.test_url)
    self.selenium.start()

def tearDown(self):
    self.selenium.stop()

Upvotes: 1

Arbie Samong
Arbie Samong

Reputation: 1205

Try nose http://code.google.com/p/python-nose/

Upvotes: 0

Related Questions