Executing Selenium IDE Tests in a Headless Environment

I’m trying to find a way to run tests created using the Firefox plugin for Selenium IDE in a headless browser setup. The tests are saved as HTML files, and while I have managed to run tests from the command line using browsers like Firefox and IE, I can’t figure out how to execute the HTML test cases with PhantomJS or a similar headless tool. I’ve attempted the following command:

java -jar selenium-server.jar -htmlSuite "*chrome" "http://localhost" "TestSuite.html" "results.html"

Although the IDE offers to export tests in various programming languages, I require a method that lets non-technical team members create tests with the Firefox plugin and then run these tests headlessly. Has anyone successfully set up a workflow for this? Any suggestions or alternative approaches would be much appreciated. Thanks!

Having worked extensively with Selenium, I can suggest an alternative approach that might suit your needs. Consider using Selenium WebDriver with a headless browser like HtmlUnitDriver. This doesn’t require the Selenium IDE plugin and can run HTML test cases without a visible browser.

To implement this, you’d need to write a simple Java program that reads your HTML test files, converts them to WebDriver commands, and executes them using HtmlUnitDriver. This approach maintains the simplicity of HTML-based tests while enabling headless execution.

For non-technical team members, you could create a basic GUI tool that allows them to select HTML test files and run them with a single click. This tool would handle the conversion and execution behind the scenes.

While this solution requires some initial development effort, it provides a balance between ease of use for non-technical staff and the ability to run tests headlessly.

I’ve grappled with this exact issue in my previous role as a QA lead. While Selenium IDE is great for non-technical folks, running those tests headlessly can be tricky. Here’s what worked for us:

We ended up using Selenium Grid with a headless Chrome node. It required some initial setup, but once in place, it was smooth sailing. We’d convert the HTML tests to Python using Selenium IDE’s export feature, then use a simple Python script to run these tests through the Grid.

For the non-technical team members, we created a user-friendly interface (just a basic web app) where they could upload their HTML tests. The backend would handle the conversion and execution.

It’s not a perfect solution, as it still requires some technical know-how to set up. But once in place, it allowed our non-tech team to create and run headless tests easily. Hope this helps point you in a useful direction!

hey, i’ve been in ur shoes. have u considered using seleniumbase? it’s pretty cool for running selenium ide tests headlessly. u can convert ur html tests to python scripts easily, then run em with phantomjs or chrome headless. might be worth checkin out. good luck!