0

hello I have doubts that how can I write pytest command in groovy script below is my pytest command code

if [some condition]
    pytest test_try.py 
else [some condition]
    pytest test_try1.py

I want to convert this code to the groovy script I try but I have didn't know how to write this code in groovy can anyone please help me

Yash Sanghavi
  • 13
  • 1
  • 3

1 Answers1

0

Something like this. Keep the path to the python file in mind.

if (some condition) {
    "pytest test_try.py".execute()
}
else if (some condition) {
    "pytest test_try1.py".execute()
}
ou_ryperd
  • 2,037
  • 2
  • 18
  • 23