java - Selectively disable automation cases per environment -
what doing: using jenkins run same test suites , test cases against various environments - dev / staging / production. i'm using webdriver java implementation , testng.
what i'd do: selectively disable some tests, not entire test suites, running depending on environment. rather maintain separate codebases between environments, i'd know of way accomplish this.
initial thoughts: thinking setting system property in jenkins each job in each environment , each test decorator have pull piece of information out determine if should ran or not. think it's clunky, i'm not sure how it, , i'm not sure if right approach.
can tell me best way accomplish this? i'm hoping isn't best way.
thanks,
joe
have looked @ testng listeners?
you can write listener before berfore test suite run after tests run have been identifier, iterate around list of tests , remove tests not want run. because programatic can write java achieve want.
also, create annotations identify tests run in environment; e.g annotate tests @runinenvironment({"uat", int"}); listener use annotations remove tests list not required.
Comments
Post a Comment