Use Cypress dashboard in the JHipster pipelines

88 views
Skip to first unread message

Anthony Viard

unread,
Jan 28, 2021, 5:04:49 PM1/28/21
to JHipster dev team
Hi there,
As you already know, we moved from protractor to Cypress for a lot of our CI pipelines.

I'm thinking of asking a dashboard plan for the project (free with 5 users and unlimited records).

It's quite simple to configure it. We need to create an entry per project in the dashboard and then inject the project key, the account key as a secret in the Github workflow.
Add the - - record flag on the Cypress run command. 

I have added a PR to generate that in the CI CD sub generator but I think it can be valuable for us.

Tracking the flacky tests, having feedback on our different scenarios, etc...

The projects can be public and we can add a badge in the readme files.

For the moment, I'm not sure where to add it in our CI:
- daily builds?
- only on master?

Anyway, I think we should start by testing on one or two projects and decide after what is the best solution for us.

What do you think?

Anthony

Matt Raible

unread,
Feb 2, 2021, 10:43:00 PM2/2/21
to Anthony Viard, JHipster dev team
If this helps identify flakey e2e tests, I think we should be willing to spend project funds on it. 

Unlike the recently proposed Gradle Enterprise, flakey e2e tests have been a problem for us over time.

Cheers,

Matt

--
You received this message because you are subscribed to the Google Groups "JHipster dev team" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jhipster-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jhipster-dev/CAPEJTRcEmhdHj9iVCaB%3D_1%2Bi9SJcAgTQOwYrx5yAT4zC6pL69A%40mail.gmail.com.

Anthony Viard

unread,
Feb 3, 2021, 4:02:40 AM2/3/21
to Matt Raible, JHipster dev team
Well, there is something about this on the Cypress website. Enable retries and use the Dashboard to track flaky tests.

There is no need to pay anything since Cypress has an OSS plan with unlimited recording. I have already asked for it, but to enable that we need to start by recording some tests.

To do it it's quite simple:
- Create a project on the Dashboard
- Inject key id and project as an env variable in repository settings
- Use '--record' flag when running Cypress

Julien Dubois

unread,
Feb 3, 2021, 6:43:30 AM2/3/21
to Anthony Viard, Matt Raible, JHipster dev team
Hi,

- I totally believe this is useful, and this would help solve one of our core issues.
- This removes the interest for Playwright: as much as I love Microsoft products (of course!!), I'd rather have the team focus on one tool that does the job well, with great tooling support
- If it's free, then it's even better :-) Just make sure we give them some love in return, so don't hesitate to tweet about it, etc

Julien



--
Julien Dubois

Twitter: @juliendubois

Anthony Viard

unread,
Feb 3, 2021, 7:40:02 AM2/3/21
to Julien Dubois, Matt Raible, JHipster dev team
I agree Julien!
You can find the Cypress documentation here: https://docs.cypress.io/guides/dashboard/flaky-test-management.html#Flake-Detection

Btw, this could be interesting to add Playwright too ;).

Testing Cypress Dashboard makes sense since it costs nothing and is easily configurable. We should start with one or two projects. The test results can be public and we can add a badge in the readme.

I've done a few streams about Cypress tests and JHipster and tweet about that as well. They retweet easily and it gives visibility for this feature and the project.

Anthony

Anthony Viard

unread,
Feb 22, 2021, 5:14:26 AM2/22/21
to Julien Dubois, Matt Raible, JHipster dev team
Hi,
following this discussion, I've tried to enable a record for one of our generated app in the CI. 
Not sure what is the best way to handle that so every help is welcome.

We have to inject the project's ID and the record key as env variables. If we succeed, I will ask for an OSS plan from the Cypress team and add more projects.

I'm still wondering if we should do this in the CI, in the nightly builds, or both.

regards,

Pascal GRIMAUD

unread,
Feb 23, 2021, 2:20:25 AM2/23/21
to Anthony Viard, Julien Dubois, Matt Raible, JHipster dev team
Hello,

Globally, I think it's a good idea to have this.

Anyway, not sure it is useful. We have everything to see these failures (emails, simple dashboard in readme, logs in CI), and we don't need more.
Because we don't have the bandwidth to check every day, to reproduce and to try to fix it.
Having 1 more dashboard is overkill, IMO.

We have random failures in our current CI, since weeks/months (with Cypress):
ci-2020-02-23.png
We have random failures in our daily builds too (with Protractor):
ci-daily-2020-02-23.png


Pascal


Reply all
Reply to author
Forward
0 new messages