def test_execute(suite): result = execute(suite) assert result.success, "Failed: %s" % result.failed assert len(result.passed) == 10 engine = ReportEngine(suite_result=result, with_html=True) report_path = engine.generate() assert os.path.exists(report_path)
def test_profile_only(config): profile = config.get_profile("www") suite = Suite.create(paths, profile) assert len(suite.queued) == 1 assert len(suite.skipped) == 14 assert suite.name == "www" result = execute(suite) assert result.success
def test_case_conditional(config): paths = [os.path.join(ROOT_DIR, "conditional.rigor")] suite = Suite.create(paths, config) assert len(suite.skipped) == 0 assert len(suite.queued) == 1 result = execute(suite) assert not result.success # test fails, checking # of steps assert len(result.failed) == 1 scenario_result = result.failed[0].failed[0] assert len(scenario_result.step_results) == 2
def result(suite): return execute(suite)
def test_execute_sync(sync_suite): result = execute(sync_suite) assert result.success, "Failed: %s" % result.failed assert len(result.passed) == 10
def test_asgi(): config = Config.load(paths) suite = Suite.create(paths, config, app=asgi, concurrency=1, retries=0) result = execute(suite) assert result.success