Skip to main content

Integration of Cypress in a Django project.

Project description

django-cypress

This package provides the necessary boilerplate to quickly begin testing your Django applications using Cypress.

Table of contents

Installation

The first step is to install Cypress as a development dependency.

npm install cypress --save-dev

Install the django_cypress package.

pip install django_cypress

Add the django_cypress app to the INSTALLED_APPS to the settings.py file:

INSTALLED_APPS = [
    ...
    'django_cypress'
    ...
]

Include the URLs of the django_cypress app to the urls.py file.

urlpatterns = [
    path("", include("django_cypress.urls")),
]

Generate the Cypress boilerplate to copy over the initial boilerplate files for your Cypress tests.

python manage.py cypress_boilerplate

We have provided a e2e/example.cy.js spec for you as an example. Open Cypress.

npx cypress open

In the Cypress window that appears, select "E2E Testing," followed by "Start E2E Testing in Chrome." This action will display a list of all the specs in your application. Click on example.cy.js to execute it.

Example Project

If you're having difficulties setting up a project using django_cypress, there is an example project that you can refer to here. Instructions on running this example project are available in this README.md file.

License

The MIT License (MIT). Please see License File for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-cypress-1.0.1.tar.gz (84.6 kB view details)

Uploaded Source

Built Distribution

django_cypress-1.0.1-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file django-cypress-1.0.1.tar.gz.

File metadata

  • Download URL: django-cypress-1.0.1.tar.gz
  • Upload date:
  • Size: 84.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for django-cypress-1.0.1.tar.gz
Algorithm Hash digest
SHA256 59bb28bd8a32457f58a64d1a3795f6e27225856fe299f036e46a8a9618e0dc95
MD5 30db7b7bd36d07b728ce3cc29833d2a3
BLAKE2b-256 f1b6ec3ff3dc72d5ee8bbd5195f90f9207da32d694baeb6f7aa49d4a4bd2d45f

See more details on using hashes here.

File details

Details for the file django_cypress-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_cypress-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c5af336732ede38f77602b18f4cd427c40bcd175c726b7067286b39c41c13b45
MD5 a67bb64b4917aae0c1d994212be072ec
BLAKE2b-256 2aa4321229227131e9897f8ed11a8aae317d93f4aadccbea702d188bfdf978f3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page