dearborn-coding-club / website-base-backend

A backend API project for the dearborn-coding-club Meetup group.
https://api.dearborncodingclub.com
1 stars 3 forks source link

Add integration testing framework #8

Open MgenGlder opened 6 months ago

MgenGlder commented 6 months ago

Summary

As we traverse down the path of adding front end pages to the site, we'll need to have trustworth integration tests that validate the site is working as expected when changes are made. These tests could then be connected to GitHub's CI to run on a pull request and validate that no regressions have been introduced.

The first step here will be to decide on a integration testing framework. I personally recommend using CypressJS, but there are other viable options as well.

Tasks

cc/ @dXu23

gonzalolanderos commented 6 months ago

Django does not seem to have any built-in front-end components/ui. We would need to use a third party tool instead. We have a few considerations:

Night watch

Pros: Uses Selenium web driver, 3rd party integration with Cucumber. Cons: It does not have many choices for unit test frameworks as it has an own testing framework and also support Mocha.

Cypress

Pros: Built-in cloud that would allow our tests to move faster Cons: Would need to watch the pricing tier and not depend on it too much.

Playwright:

Pros: VSCode plug-in for managing and "recording" the tests. Cons: Newer technology, therefore smaller community than other testing frameworks (started in 2020)

Other links:

MgenGlder commented 6 months ago

One thing to also consider is speed/performance. I'm not entirely sure which wins out here, but it would be nice to use a framework that spins up and tests quickly so we can add it as a regular part of CI during a pull request.