Back to Zulip

Development tools

templates/zerver/development/dev_tools.html

12.03.4 KB
Original Source

{% extends "zerver/portico.html" %} {% block title %}

Development tools | Zulip Dev{% endblock %} {# Login page. #} {% block portico_content %}

Development tools

This page describes development-specific URLs and commands that may come in handy. Make sure your development server is running when you visit the pages linked below.

General

URLCommandDescription
/devtools/integrationsNone neededTest incoming webhook integrations
/emailsNone neededView outgoing and example emails.
/digestNone neededView sample digest email.
/docs/index.html./tools/build-docsDeveloper and production documentation (ReadTheDocs) built locally
/stats/realm/analytics/./manage.py populate_analytics_db
Run the command after changing analytics data population logic.View the /stats page with some pre-populated data

Design system

URLDescription
/devtools/buttonsTest button styles
/devtools/bannersTest banner styles
/devtools/inputsTest input styles

Test coverage

URLCommandDescription
/coverage/index.html./tools/test-backend --coverageBackend (Django) test coverage report
/node-coverage/index.html./tools/test-js-with-node --coverageFrontend (node) test coverage report

Useful management commands

Development-specific management commands live in zilencer/management/commands. Highlights include:

  • ./manage.py populate_db: Rebuilds database. Has options to, for example, create 3K users for testing.
  • ./manage.py mark_all_messages_unread: Useful for testing reading messages.
  • ./manage.py send_zulip_update_announcements: Send Zulip update notices drafted in zerver/lib/zulip_update_announcements.py.
  • ./manage.py add_mock_conversation: Add test messages, streams, images, emoji, etc. into the dev environment. First edit zilencer/management/commands/add_mock_conversation.py to add the data you're testing.

We also have documentation on testing LDAP, Google & GitHub authentication in the development environment.

Modifying and running the help center

{% include "zerver/development/help_center_instructions_macro.html" %}

Viewing error pages

URLCommandDescription
/webpack/5xx.htmlNone neededError 5xx page served by nginx (used when Django is totally broken)
/errors/404None neededError 404 page served by Django
/errors/5xxNone neededError 5xx page served by Django
/accounts/do_confirm/invalidNone neededInvalid confirmation link page

Connecting to the local PostgreSQL database

  • ./manage.py dbshell: Connect to PostgreSQL database via your terminal.
  • provision creates a ~/.pgpass file, so psql -U zulip -h localhost works too.
  • To connect using a graphical PostgreSQL client like pgAdmin, use the following credentials:

{% endblock %}