Running Selenium Server & ChromeDriver as a Windows Service

后端 未结 8 2059
走了就别回头了
走了就别回头了 2020-12-14 09:57

So that we may perform front-to-back web UI testing, we are using Selenium and ChromeDriver to automate page loads / interaction as part of our testing pack.

This

相关标签:
8条回答
  • 2020-12-14 10:53

    It could be easily done with NSSM. Installation of services looks like these:

    nssm install seleniumhub java -jar C:\selenium\selenium-server-standalone-2.45.0.jar -role hub -hubConfig C:\selenium\hub.json
    nssm install seleniumnode java -jar C:\selenium\selenium-server-standalone-2.45.0.jar -role node -nodeConfig C:\selenium\node.json
    

    It provides easily way to remove service if needed:

    nssm remove seleniumnode confirm
    

    Add destination to nssm to your PATH variable and run from console as admin

    0 讨论(0)
  • 2020-12-14 10:53

    we don't use selenium GRID, we were disappointed with its stability. We use a "Jenkins Grid", that is jenkins slaves nodes on various servers.

    The slaves are services with the interact with desktop flag. They run as services with NSSM, and the SERVICE_INTERACTIVE_PROCESS flag. Making sure that NoInteractiveProcess is set to 1 (cf https://docs.microsoft.com/en-us/windows/desktop/services/interactive-services).

    We don't have the fancy features of the grid (that is balancing according the browser types slots). Instead, we have Jenkins balancing the test jobs using a slave node or another. Initially we did not use the interact with desktop flag, having browsers to run without "real" display, but the behavior was not very stable (especially with resize commands). Hope this helps.

    0 讨论(0)
提交回复
热议问题