DEV Community

Cover image for Automate e2e tests in GitHub actions
Mohammad Jawad (Kasir) Barati
Mohammad Jawad (Kasir) Barati

Posted on

1

Automate e2e tests in GitHub actions

I was writing E2E tests for this project of mine which is not something really serious, but rather I am doing it as a way to learn and practice my skills. So I though why I am troubling myself with manually testing my E2E tests on my local system. Let's write some tests in jest and then automate it with GitHub actions.

And it is a really nice feeling that you get, you're kinda sure that your codes were not for nothing. But you wrote them and they are tested. So even if the future version of you will be grateful to you for taking the time and automating these tedious, time consuming tasks.

What I am trying to accomplish here is to push you towards writing more tests. Because it:

  1. Boosts health by allowing you to rest well during nights.2. Catch errors ASAP.
  2. Fixing bugs ASAP.
  3. Promoting a quality first culture.
  4. Saving time, and energy where it is most needed (By having quick builds and short feedback loops).
  5. Better UX, happier users.
  6. Enables you to catch recurring bugs/issues, then you can come up with a concrete plan to handle it properly.
  7. And more.

TBF I cannot see one downside to writing tests, exercising TDD practice, and automating your build and tests.

Additional docs + repo

  • If you're curious as to how I did it you can check my repo here.
  • I also documented most important stuff in here.

Feel free to share your thoughts on this in the comments. Looking forward to read your comments.

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay