Exemplo n.º 1
0
def test_classic_runner_raise_exception(driver):
    classic_runner = ClassicRunner()
    eyes = Eyes(classic_runner)
    eyes.open(
        driver,
        "Applitools Eyes Java SDK",
        "Classic Runner Test",
        dict(width=1200, height=800),
    )
    eyes.check("Step 1", Target.window())
    eyes.close(False)
    with pytest.raises(Exception):
        classic_runner.get_all_test_results()
Exemplo n.º 2
0
def runner_setup():
    """
    One test runner for all tests. Print test results in the end of execution.
    """
    runner = ClassicRunner()
    yield runner
    all_test_results = runner.get_all_test_results()
    print(all_test_results)
Exemplo n.º 3
0
def test_classic_runner_works_normally(driver):
    classic_runner = ClassicRunner()
    eyes = Eyes(classic_runner)
    driver.get("https://applitools.github.io/demo/TestPages/FramesTestPage/")
    eyes.open(
        driver,
        "Applitools Eyes Java SDK",
        "Classic Runner Test",
        dict(width=1200, height=800),
    )
    eyes.check("Step 1", Target.window())
    eyes.close(False)
    print(classic_runner.get_all_test_results())
Exemplo n.º 4
0
def test_get_all_test_results(local_chrome_driver):
    local_chrome_driver.get(
        "https://applitools.github.io/demo/TestPages/SimpleTestPage")
    runner = ClassicRunner()
    eyes1 = Eyes(runner)
    eyes1.configure.set_hide_scrollbars(False)
    eyes1.open(local_chrome_driver, "USDK Test", "Test get all test results 1")
    eyes1.check_window()
    results = [eyes1.close()]
    eyes2 = Eyes(runner)
    eyes2.configure.set_hide_scrollbars(False)
    eyes2.open(local_chrome_driver, "USDK Test", "Test get all test results 2")
    eyes2.check_window()
    results.append(eyes2.close())

    all_results = runner.get_all_test_results()

    assert len(all_results) == 2
    assert results[0] == all_results[0].test_results
    assert results[1] == all_results[1].test_results