Dusk, Cypress or Playwright for filament browser tests?

I'm trying to decide which browser testing tool to use. Dusk only supports chrome, but I've seen posts that indicate dusk may not recognise all form elements in Filament, Any suggestions or tips gratefully received
27 Replies
awcodes
awcodes4d ago
Maybe the real question is are front end tests really needed, ie, when’s the last time you made front end changes that you weren’t manually testing. Idk.🤷 Like if I make changes to our forms I’m not testing user interaction because the if it passes on the server then It’s not a concern to me.
acroninja
acroninjaOP4d ago
They really are needed. We have a long sales order process that involves creating different types of orders, booking coaching sessions, sending an email, clicking links in those emails to confirm a booking. Any number of system updates can cause errors that may not be picked up by a unit test. We alos have 4 different auth guards, each of which has his own admin panel. It's big and complex and in production. It needs to be robust.
awcodes
awcodes4d ago
But are those frontend? Those sound like server side processes to me.
acroninja
acroninjaOP4d ago
Manual testing of our frontend process might take around 10-15 minutes per type of order automated testing drops that to 20 seconds yes it's frontend because we require a user go a click a link in an email, see a page, fill in a form, submit, receive another email. And then another user type has to then interact more with that order.
awcodes
awcodes4d ago
That still doesn’t make sense. The click in an email isn’t relevant.
acroninja
acroninjaOP4d ago
Funnily enough, one error we had in production was a JS error with tiptap editor- not picked up in unit testing, now replace with tiny editor which is working great
awcodes
awcodes4d ago
The page either load appropriately based on the url, the click doesn’t matter.
acroninja
acroninjaOP4d ago
The click in an email is totally relevant. Thats the process that needs to be followed. If you don't know the answer it's ok, please believe me we need browser tests
awcodes
awcodes4d ago
The link is the link. So what the response is doesn’t matter to the front end. Don’t get me wrong I want to help, I’m just not seeing the correlation to the view in this context.
acroninja
acroninjaOP4d ago
the unit test won't confirm that the user received an email with a clickable link. the link then opens a signed url, user does some input and saves form. Another email is sent. Another user then receives an email with a link to the admin panel to edit the order. They then need to login, view that order, and enter more stuff, Another email is sent. Some time passes and the training session should have elapsed. Now we expect to see another email sent to the coach to confirm if the session was completed or cancelled and thats only part of the process
awcodes
awcodes4d ago
Do you have conditionally views based on url params?
acroninja
acroninjaOP4d ago
yes
awcodes
awcodes4d ago
None of this sounds front end to me. Like the front end doesn’t know if an email was sent. I could be completely wrong but I feel like you’re trying to test the wrong thing.
acroninja
acroninjaOP4d ago
url param example:- on the organisation page there is a button to create quote. Organisation id or contact id is passed as a url param to the quote create page i need to know that the select box is prepopulated with the organisation name
awcodes
awcodes4d ago
But the url isn’t what you are focused on. You’re focused on an email being sent during the response lifecycle. Not a front end thing. Maybe I’m just misunderstanding. Sorry.
acroninja
acroninjaOP4d ago
dude, stop arguing with me, i know what i need and i don't need to be wasting time trying to convince you that my requirement is valid It's not just the email, thats one part of a long process to create and process an order
awcodes
awcodes4d ago
Fair enough. I’ve offered my understanding based on what you’ve provided. I’ll leave you to it. Maybe someone else can help you more.
acroninja
acroninjaOP4d ago
Thanks, you're giving me flashbacks to a traumatic period when this old dinosaur developer that used to work for me argued about everything. I used to hate going into the office at that time, it was a really shit period. Thankfully he doesn't work for me anymore and life is good.
awcodes
awcodes4d ago
I wish you the best. Sorry I’m a dinosaur.
acroninja
acroninjaOP4d ago
Mate, experience is useful, I'm 51 already so well on the way to being a fossil But i've been coding since 1983 and there's not much I haven't seen in code
awcodes
awcodes4d ago
I’m old too. You asked a question I asked back. Just trying help. If it doesn’t help. Sorry. I don’t know everything but I do have some knowledge. Just saying.
acroninja
acroninjaOP4d ago
SOK, good to question everything i suppose but we really do need a browser test. Even if it's just for my amusement and joy to watch it run - which it isn't.
awcodes
awcodes4d ago
Long story short. My recommendation is play right.
acroninja
acroninjaOP4d ago
Ahha Great, I was leaning that way. range of different browsers tested. we had a really angry email from a firefox user who couldn't login and was very upset that we clearly didn't support alternative browsers as he could login with chrome. Wasnt any bug, just user error from what we could tell!! So I would also like to be able to say to the client, the sales order process has been tested in Chome, Safari, FF, Edge or whatever MS is calling their browser now 🧐
acroninja
acroninjaOP4d ago
If anyone interested there are bunch of articles comparing Cypress and Playwright. Gonna try playwright as it also has mobile emulation and ability to work on multiple domains which didn't work on Cypress https://www.browserstack.com/guide/playwright-vs-cypress https://www.lambdatest.com/blog/cypress-vs-playwright/ https://medium.com/@mohsenny/deciding-between-cypress-and-playwright-a-comprehensive-guide-4d883d1be147
BrowserStack
Playwright vs Cypress: A Comparison | BrowserStack
Check out the comparison of Playwright vs Cypress and calibrate against the framework that best fits your automation needs.
Ioan Solderea
LambdaTest
Cypress vs Playwright: A Detailed Comparison | LambdaTest
Delve into a comparative analysis of two widely-used automation testing frameworks: Cypress vs Playwright. Uncover their distinctive attributes and functionalities to discern which tool aligns best with your testing requirements.
Medium
Deciding Between Cypress and Playwright: A Comprehensive Guide
Harnessing the Strengths of Two Leading Testing Frameworks for Optimal Web Development
Mohamed Ayaou
Mohamed Ayaou4d ago
@awcodes It may sounds weird and none pro approach but many devs are using dusk or front-end only testing tools for the end-to-end testing. I meant the only testings for the app 😃
toeknee
toeknee4d ago
You can use frontend testing for apps that require external JS calls but really if you thought about it correctly your functional tests are all unit based. You are just handling it in a complex way that you want it to run as if a user was doing it, but each section should work i.e. if email sent success, get the url from it and pass the parameters in the url into the receiving frontend function and so on. Playwright is pretty good aswell as dusk, I'd suggest you use what works for you and in future please do not disrespect people who are tyring to help even when they have a difference perspective and haven't put you down either.

Did you find this page helpful?