DEV Community

Cover image for A Beginner's Guide to Writing End-to-End Tests with TestCafe

A Beginner's Guide to Writing End-to-End Tests with TestCafe

Phoebe M on March 04, 2020

Lately, with the planning of a new application launch, I'm learning all the aspects needed to design/develop an application, which isn't just codin...
Collapse
 
laradurrant profile image
Lara Durrant

Thanks for the tutorial! I honestly haven’t written very many tests— looking forward to giving this a go!

Collapse
 
awkwardblkcoder profile image
Phoebe M

You're welcome. Glad you're going to try it out, let me know how it goes.

Collapse
 
laradurrant profile image
Lara Durrant

Hi! I got a chance to take the tutorial! I still want to take some more time to play around with TestCafe, but from following along I wrote a few tests and was rewarded with three happy green checkmarks! :) There was only one spot I got stuck on while following along and it was related to the expect statement. In your screenshot, the font color (due to the highlighting) made it hard to read so I initially wasn't sure how to format it all. Of all the things, it was only a minor detail, though. Cheers & hope you keep writing!

Thread Thread
 
awkwardblkcoder profile image
Phoebe M

Hey ! Glad it worked . And yeah I may edit and post without the highlight bc the highlight whites out the “.” before the expect statement. Thanks for pointing that out!

Collapse
 
pavelloz profile image
Paweł Kowalski • Edited

Good to see TestCafe gaining traction :)

I did some writing on our best practices, hopefully it will help to write better/more robust/faster tests, and more reliable applications.

Links:
platformos.com/blog/post/blog/qa-a...
platformos.com/blog/post/blog/qa-a...
platformos.com/blog/post/blog/qa-a...

We also have more tutorial-like series for getting started, similar to yours:
documentation.platformos.com/best-...
documentation.platformos.com/best-...
documentation.platformos.com/best-...

Have fun :)

Collapse
 
awkwardblkcoder profile image
Phoebe M

Great material! I’m still in the process of learning e2e testing so will be looking into your articles to see what I can learn from them. Thanks for sharing!

Collapse
 
thebadcoder profile image
TheBadCoder

I am not sure, but does Test cafe supports reporting?

Collapse
 
awkwardblkcoder profile image
Phoebe M

Good question. I’m not sure either, but I’ll add it to my list of things to research

Collapse
 
thebadcoder profile image
TheBadCoder

Were you able to find the answer?

Thread Thread
 
awkwardblkcoder profile image
Phoebe M • Edited

Hi! I haven't looked into the answer to this question yet thoroughly (haven't been working on test cases for a while and have shifted my focus to another topic), but I came across this article. Hopefully it will help you with what you're looking to do: devexpress.github.io/testcafe/docu....

Collapse
 
thebadcoder profile image
TheBadCoder

Sure..👍

Collapse
 
dayour5539 profile image
Dayour5539

Thanks for the tutorial, Pls I use a windows OS, and I want to run the test, the command line would not work for my windows OS. Kindly help with the write command line for Windows OS.

Collapse
 
awkwardblkcoder profile image
Phoebe M

Hi! I use a Windows OS as well. what editor do you use?