Tests fail when triggered through jenkins
I have upgraded my test suite to latest selenium, Firefox, and geckodriver. When I run the tests locally they work fine, when I run them on a remote box executing the command in the remote box they work fine. But when I trigger the suite from Jenkins, they fail a lot. I tried both setting Jenkins agent as a service and as a batch. Any help with this issue, please...
they fail a lot.
Jenkins is not some magical beast, it simply runs commands on a machine.
Try debugging it like you would debug failures on your local machine, with the exception that you can't debug interactively (although you can do even that to some degree by running pipeline commands on the node). For example
- check you environment variables
- check that you actually run on the node(s) you think you run on
- verify that the needed binaries, libraries and supporting files are in place on the node(s)
- follow the clues in the error messages as @Sachintha suggested in the comments
- add debug messages throughout the test to pinpoint where it fails and why
and so on...