You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, Serenity/JS provides REST testing capabilities via the @serenity-js/rest module and uses axios under the hood. This is particularly useful in E2E tests for performing data setup/tear down tasks that would've been much slower or impossible to perform via the web UI.
However, some web integration tools, like Playwright Test with its request object also provide a capability to interact with REST APIs, or like WebdriverIO - might provide it in the near future webdriverio/webdriverio#7187
While Serenity/JS REST can be used with Playwright, Protractor, WebdriverIO, or even standalone, it would be nice to reuse the API client provided by Playwright Test so that developers don't have to configure axios from scratch.
How would you like to solve it?
The universal testing façade approach used with Serenity/JS Web could also be applicable here:
@serenity-js/rest could be made integration tool-agnostic so that it doesn't have a dependency on Axios
@serenity-js/axios module could be introduced to provide Axios-specific implementation
@serenity-js/playwright-test module could provide a Playwright-specific implementation compatible with @serenity-js/rest, e.g. CallAnApiWithPlaywright, and provide it automatically to any Serenity/JS actors used with Playwright Test
@serenity-js/webdriverio module could provide a WebdriverIO-specific implementation
Are there any alternatives?
Developers can continue to use @serenity-js/rest with the standard axios client, and we could provide more docs around setting it up.
There might be an easier way to solve it and avoid introducing new modules; To do that, axios instance used by @serenity-js/rest could be configured automatically by @serenity-js/playwright-test or @serenity-js/webdriverio based on the configuration of their respective web browsers.
What's the problem you're trying to solve?
At the moment, Serenity/JS provides REST testing capabilities via the
@serenity-js/rest
module and usesaxios
under the hood. This is particularly useful in E2E tests for performing data setup/tear down tasks that would've been much slower or impossible to perform via the web UI.However, some web integration tools, like Playwright Test with its
request
object also provide a capability to interact with REST APIs, or like WebdriverIO - might provide it in the near future webdriverio/webdriverio#7187While Serenity/JS REST can be used with Playwright, Protractor, WebdriverIO, or even standalone, it would be nice to reuse the API client provided by Playwright Test so that developers don't have to configure
axios
from scratch.How would you like to solve it?
The universal testing façade approach used with Serenity/JS Web could also be applicable here:
@serenity-js/rest
could be made integration tool-agnostic so that it doesn't have a dependency on Axios@serenity-js/axios
module could be introduced to provide Axios-specific implementation@serenity-js/playwright-test
module could provide a Playwright-specific implementation compatible with@serenity-js/rest
, e.g.CallAnApiWithPlaywright
, and provide it automatically to any Serenity/JS actors used with Playwright Test@serenity-js/webdriverio
module could provide a WebdriverIO-specific implementationAre there any alternatives?
Developers can continue to use
@serenity-js/rest
with the standardaxios
client, and we could provide more docs around setting it up.How can we make it happen?
The text was updated successfully, but these errors were encountered: