From 0e2e04343265ccbb2186b286deebb57f219b823b Mon Sep 17 00:00:00 2001 From: Clare So Date: Mon, 15 Jan 2024 16:28:30 -0500 Subject: [PATCH] Can Github Actions talk to TestRail? --- .github/workflows/staging-push.yml | 2 +- testrail.py | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/staging-push.yml b/.github/workflows/staging-push.yml index 85381d3..dac7a00 100644 --- a/.github/workflows/staging-push.yml +++ b/.github/workflows/staging-push.yml @@ -43,4 +43,4 @@ jobs: echo "Hello world!" ls pwd - + python testrail.py diff --git a/testrail.py b/testrail.py index 6366c82..a134c18 100644 --- a/testrail.py +++ b/testrail.py @@ -302,3 +302,13 @@ def report_test_runs_insert(self, project_id, payload): testrail_completed_on=completed_on) self.session.add(report) self.session.commit() + +if __name__ == "__main__": + testrail = TestRail() + + # PROJECT_IDS = [59, 14, 27, 48] + PROJECT_ID = 59 # Fenix + SUITE_ID = 3192 + response = testrail.test_cases(PROJECT_ID, SUITE_ID) + # response = testrail.test_cases(PROJECT_ID) + pprint(response) \ No newline at end of file