def test_fixtures_fail():
    """run empty selenese test file, just to check whether fixtures work
    Since fixtures argument is not given to SelexeRunner this test should fail.
    """
    selexe = SelexeRunner('fixtures.sel', fixtures=None)
    try:
        res = selexe.run()
    except NoSuchElementException:
        pass
def test_failing_test():
    """run simple selenese test, with verifyText find wrong string"""
    selexe = SelexeRunner('verifyTestFailing.sel')
    res = selexe.run()
    assert res == ['Actual value "DIV 1" did not match "This should fail!"']
def test_fixtures():
    """run empty selenese test file, just to check whether fixtures work"""
    selexe = SelexeRunner('fixtures.sel', fixtures='selexeFixtures.py')
    res = selexe.run()
    assert res == []
def test_simple_page():
    """run simple selenese test, without fixtures"""
    selexe = SelexeRunner('verifyTests.sel')
    res = selexe.run()
    assert res == []
def test_simple_form():
    """run simple selenese test, without fixtures"""
    selexe = SelexeRunner('form1.sel')
    res = selexe.run()
    assert res == []
def test_failing_test():
    """run simple selenese test, with verifyText find wrong string"""
    selexe = SelexeRunner('verifyTestFailing.sel', **SELEXE_OPTIONS)
    errors = selexe.run()
    assert errors
def test_fixtures():
    """run empty selenese test file, just to check whether fixtures work"""
    selexe = SelexeRunner('fixtures.sel', fixtures='selexeFixtures.py', **SELEXE_OPTIONS)
    errors = selexe.run()
    assert not errors
def test_simple_form():
    """run simple selenese test, without fixtures"""
    selexe = SelexeRunner('form1.sel', **SELEXE_OPTIONS)
    errors = selexe.run()
    assert not errors
def test_simple_page():
    """run simple selenese test, without fixtures"""
    selexe = SelexeRunner('verifyTests.sel', **SELEXE_OPTIONS)
    errors = selexe.run()
    assert not errors
Exemple #10
0
 def runtest(self):
     selexe = SelexeRunner(self.fspath.strpath, baseuri=self.config.option.baseuri,
                           fixtures=self.config.option.fixtures)
     res = selexe.run()
     if res:
         raise SelexeError(res)