Skip to content

NoriSte/javascript-testing-practical-approach-2021-course

Repository files navigation

Javascript Testing, a Practical Approach

Javascript Testing, a Practical Approach

Description

This is the reference repository with all the contents and the examples of the "Javascript Testing, a Practical Approach" course.

The course starts from the peak of the testing pyramid and goes down instead of following the "standard" testing path.

Environment

Requirements

Getting ready for the course

Are you ready for the course? Check it out with the following guides.

Mac OS and Linux

  • Installing everything listed in the Environment section
  • Having Docker Desktop running
  • Launching $ npm install
  • Launching $ npm run test:smoke

The steps above launch the back-end and application, the front-end application, and Cypress. If you see something like

      Spec                           Tests  Passing  Failing  Pending  Skipped
┌─────────────────────────────────────────────────────────────────────────────┐
│ ✔  realworld/smoke.spec.js  00:01     2        2        -        -        - │
└─────────────────────────────────────────────────────────────────────────────┘
  ✔  All specs passed!        00:01     2        2        -        -        -

you're ready for the course!

Windows

Getting everything working reliably on Windows is hard. On Windows machines, the public version of RealWorld is used:

The tests without local dependencies

  • must be adapted considering the changes between the local version and the public one
    • URLs are hash-based on the public version
    • passwords must be 9+ long
    • some buttons and labels have different texts
  • won't work if leverage the App Actions
  • won't work if leverage additional packages (like jest-expect)

During the course

The most important scripts are:

  • $ npm run cy:open: starts the Cypress UI
  • $ npm run realworld:start: starts both the back-end and the front-end project
  • $ npm run realworld:frontend:start: starts only the front-end project

About me

Stefano Magni

I'm Stefano Magni, I'm a passionate and positive-minded Senior Front-end Engineer, a Speaker, and an Instructor from Italy (working remotely since 2018). Developing User Interfaces, solving problems, and helping people are my passions.

I have worked in this field for more than ten years, including experience with different codebases (currently working on a 250K-LOC one) and various companies: a mid-size company, a Bitcoin startup, a web-agency, etc. organized through Scrum, Kanban, or classic Waterfall.

What I love:

  • working with passionate people
  • coding User Interfaces, solving the closest to the user problems
  • writing maintainable and easy to refactor code
  • guaranteeing the highest possible quality of my work with precise execution and problems prevention
  • easing other developers and stakeholders work with high proactivity, communication, providing a lot of feedback, mentoring, and improving workflows
  • actively looking for and proposing solutions for every kind of problem I see
  • learning and solidifying/spreading my knowledge by speaking and teaching

In the last years, I became a speaker again, revamping my learning path completely, including answering on StackOverflow, writing articles, sharing plugins, and speaking at meetups.

I'm currently focused on React, TypeScript and all their ecosystems.

I wrote a big UI Testing Best Practices project on GitHub.

GitHub - LinkedIn - Twitter

Resources

Cypress Docs

Articles

Additional courses

Extensive resources