Vitor Barbosa
Vitor Barbosa

Reputation: 23

Is there a way to use a hook on testcafe studio without copy/paste from another test?

As I always need to login to execute the tests and every time I need to re-do the log-in steps making it hard to maintain

I found out that on testcafe.js is possible to use hooks as a workaround but that is not the kind of optimal way

I need to save a constant login/password and alter them one time only as needed, just like a code but on the testcafe studio

Upvotes: 2

Views: 159

Answers (1)

Alex Kamaev
Alex Kamaev

Reputation: 6318

We are planning to release a new version of TestCafe Studio this or next month. This version will contain the hooks feature, which would be built over TestCafe hooks (https://devexpress.github.io/testcafe/documentation/test-api/test-code-structure.html#initialization-and-clean-up)

Thus, you'll be able to use your login steps only once in hook without copying.

In addition, a bit later, we are planning to release the support of custom nodejs code inside a test, which will allow using the Roles mechanism.

Upvotes: 3

Related Questions