コード例 #1
0
ファイル: test_session.py プロジェクト: mmerrell/simple_sauce
    def test_update_method(self):
        session = SauceSession()

        session.start()

        session.update_test_result(True)
        session.stop()
コード例 #2
0
def driver(request):
    opts = SauceOptions(browserName=request.param)
    sauce = SauceSession(options=opts)
    sauce.start()

    yield sauce.driver

    sauce.stop()
コード例 #3
0
def driver(request):
    opts = SauceOptions()
    opts.name = request.node.name
    sauce = SauceSession(options=opts)
    sauce.start()

    yield sauce.driver

    # report results
    # use the test result to send the pass/fail status to Sauce Labs
    result = not request.node.rep_call.failed

    sauce.stop(result)
コード例 #4
0
def driver(request):
    opts = SauceOptions()
    opts.name = request.node.name
    sauce = SauceSession(options=opts)
    sauce.start()

    yield sauce.driver

    # report results
    # use the test result to send the pass/fail status to Sauce Labs
    if request.node.rep_call.failed:
        sauce.setTestStatus("failed")
    else:
        sauce.setTestStatus("passed")

    sauce.stop()
コード例 #5
0
    def test_failing_case(self):
        session = SauceSession()

        session.start()

        session.stop(False)
コード例 #6
0
    def test_passing_case(self):
        session = SauceSession()

        session.start()

        session.stop(True)
コード例 #7
0
"""Most basic example of using Simple Sauce.

Here we start a session on Sauce, perform some actions then close the session.
"""
from simplesauce.session import SauceSession


session = SauceSession()

session.start()
session.driver.get("https://www.saucedemo.com")

assert "Swag" in session.driver.title

session.stop()
コード例 #8
0
ファイル: test_session.py プロジェクト: mmerrell/simple_sauce
    def test_it_quits_the_driver(self):
        session = SauceSession()

        session.start()

        session.stop()
コード例 #9
0
ファイル: basic.py プロジェクト: coleve27/simple_sauce
"""Most basic example of using Simple Sauce.

Here we start a session on Sauce, perform some actions then close the session.
"""
from simplesauce.session import SauceSession


session = SauceSession()

session.start()
session.driver.get("https://www.saucedemo.com")

result = "Swag" in session.driver.title

session.stop(result)