TestProject Forum

Run test headless via API

Hi.

When running a test manually I have the option to use Chrome headless.
image
When triggering the test via TestProject API “ChromeHeadless” browser type fails with the error: Message": [ “The browser [ChromeHeadless] is not installed on the agent” ]

If I query the agent via API, browsers returned are:
[
{
“type”: “Chrome”,
“version”: “81.0.4044.129”,
“bitness”: 0
},
{
“type”: “Edge”,
“version”: “90.0.818.49”,
“bitness”: 0
},
{
“type”: “InternetExplorer”,
“version”: “11.0.17763.771”,
“bitness”: 0
}
]

Regards,
Mike

Hi @mike.lauritsen_testp,

Thank you for letting us know about this issue. We looked into it and indeed, there’s an issue with running tests with a headless browser via the TestProject API.

We are working on fixing this issue and we’ll let you know once it will become available.

Thanks again,
Amit

Hello @mike.lauritsen_testp,

Thanks for bringing this to our attention. :+1:
The issue was fixed. You can now run tests on headless Chrome and Firefox browsers when using the API. This capability joins the already existing option to override job browsers (regular or/and headless) when running using the API.

We’ve also fixed the agent browsers endpoint to return the headless browsers alongside the regular ones.
Here is an example of a response:
[ { "type": "Chrome", "version": "90.0.4430.93" }, { "type": "Edge", "version": "90.0.818.51" }, { "type": "Firefox", "version": "86.0.0.7723" }, { "type": "ChromeHeadless", "version": "90.0.4430.93" }, { "type": "FirefoxHeadless", "version": "86.0.0.7723" } ]

I hope that this is what you were looking for. Have a splendid week, and keep safe! :slightly_smiling_face:

Hi @eldar

Thank you for the quick response to this issue. Everything is now working as expected.

Mike

1 Like