0

looking around a bit and I can't seem to find this answer. I am new to pytest so I could be wording what I am trying to do incorrectly or searching with wrong parameters but here I go.

I made a test that SSH's to a router and checks that it logged in. and it work (hooray) I am also aware that I can install a plugin (xdist) to have multiple instances of the test run but my question is, is there a way to have that one test be expanded to more then one router or will I need to write the same test with different IP's?

(sorry if this has been asked but I found nothing that talks about this type of scenario)

Keith
  • 11
  • 2
  • One random thought was to make a launch script that would be able to read a file with the IP's (possible other features) and call pytest with that IP allowing it to be passed as a command line argument, but not sure if this would run all at the same time or not :/ – Keith Mar 31 '17 at 16:41
  • Have you looked at `parameterizing` feature py.test provides. https://docs.pytest.org/en/latest/parametrize.html – Li Feng Apr 05 '17 at 18:41
  • Yes, im currently looking at that implementation along with xdist. :) – Keith Apr 06 '17 at 19:26
  • Look at this example https://holgerkrekel.net/2013/11/12/running-tests-against-multiple-devicesresources-in-parallel/ – user2812866 Apr 28 '17 at 01:26

0 Answers0