Using Selenium Webdriver and Python Scripting I have created a project and was able to make a series of test cases in PyCharm that run on Unit Test. Now I'm able to run my test/test-suite using the below command in the terminal
python -m pytest /test/smoke/test_suite1.py --browser=chrome --baseURL=dev"
The Project had a directory which contains the WebDriver and Conftest.py file, POM's, Test Scripts etc..
Now my test/test-suite currently run when I am in PyCharm and pass the terminal command. I have moved my project to the Git repository now but also would like to run these test cases in Jenkins via GIT repository.
There are two ways I would prefer doing the CI.
- Schedule a time (once per week) to run through the tests and send email of result.
- Upload my test cases to a repository on GitHub and when there is a change done to the repository, run the tests and/or on a schedule (once per week).
Ive honestly tried to look up tutorials (videos/documents) but they all seem very unclear.
Is it better to do this with a Jenkins Plugin? If so what are the things I need to add/change to allow this to happen, and configure in Jenkins.