2017-06-14 02:01:01 +02:00
{% extends "zerver/portico.html" %}
2022-09-06 12:04:03 +02:00
{% block title %}
< title > Tools and data sets | Zulip Dev< / title >
{% endblock %}
2017-06-14 02:01:01 +02:00
{# Login page. #}
{% block portico_content %}
2018-08-19 02:10:04 +02:00
< div class = "app flex full-page" >
< div id = "devtools-page" class = "markdown" >
< h1 > Useful development URLs< / h1 >
< p >
Below is a list of useful tools and data sets available only in the Zulip
development environment that are often useful when contributing to Zulip.
Most of these require you to run a command to build/generate the relevant
content. This table specifies which command to use to update the data served
by each page (since several of these, like test coverage, require a special
command to be run to generate the data). Make sure your development server is still running
when you visit these!
< / p >
< table class = "table table-striped table-rounded table-bordered" >
< thead >
< tr >
< th > URL< / th >
< th > Command< / th >
< th > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td > < a href = "/coverage/index.html" > /coverage/index.html< / a > < / td >
< td > < code > ./tools/test-backend --coverage< / code > < / td >
2020-01-17 08:51:35 +01:00
< td > Backend (Django) test coverage report< / td >
2018-08-19 02:10:04 +02:00
< / tr >
< tr >
< td > < a href = "/node-coverage/index.html" > /node-coverage/index.html< / a > < / td >
< td > < code > ./tools/test-js-with-node --coverage< / code > < / td >
2020-01-17 08:51:35 +01:00
< td > Frontend (node) test coverage report< / td >
2018-08-19 02:10:04 +02:00
< / tr >
< tr >
< td > < a href = "/docs/index.html" > /docs/index.html< / a > < / td >
< td > < code > ./tools/build-docs< / code > < / td >
2020-01-17 08:51:35 +01:00
< td > Developer documentation (ReadTheDocs) built locally< / td >
2018-08-19 02:10:04 +02:00
< / tr >
< tr >
< td > < a href = "/emails" > /emails< / a > < / td >
2020-01-17 08:51:35 +01:00
< td > View outgoing and example emails.< / td >
2018-08-19 02:10:04 +02:00
< / tr >
< tr >
< td > < a href = "/stats/realm/analytics/" > /stats/realm/analytics/< / a > < / td >
2021-04-21 00:46:14 +02:00
< td > < code > ./manage.py populate_analytics_db< / code > < br / >
2018-08-19 02:10:04 +02:00
Run the command after changing analytics data population logic.
< / td >
< td > View the /stats page with some pre-populated data< / td >
< / tr >
< tr >
2019-10-22 02:02:14 +02:00
< td > < a href = "/webpack/5xx.html" > /webpack/5xx.html< / a > < / td >
2018-08-19 02:10:04 +02:00
< td > < code > ./manage.py collectstatic --noinput< / code > < / td >
< td > Error 5xx page served by nginx (used when Django is totally broken)< / td >
< / tr >
< tr >
< td > < a href = "/errors/404" > /errors/404< / a > < / td >
< td > None needed< / td >
< td > Error 404 page served by Django< / td >
< / tr >
< tr >
< td > < a href = "/errors/5xx" > /errors/5xx< / a > < / td >
< td > None needed< / td >
< td > Error 5xx page served by Django< / td >
< / tr >
< tr >
< td > < a href = "/accounts/do_confirm/invalid" > /accounts/do_confirm/invalid< / a > < / td >
< td > None needed< / td >
< td > Invalid confirmation link page< / td >
< / tr >
2019-04-14 15:28:19 +02:00
< tr >
< td > < a href = "/devtools/integrations" > /devtools/integrations< / a > < / td >
< td > None needed< / td >
< td > Test incoming webhook integrations< / td >
< / tr >
2018-08-19 02:10:04 +02:00
< / tbody >
< / table >
2020-01-17 08:51:35 +01:00
< h2 > Useful management commands< / h2 >
2023-01-06 15:46:02 +01:00
< p > Development-specific < a href = "https://zulip.readthedocs.io/en/latest/production/management-commands.html" > management commands< / a > live in < code > zilencer/management/commands< / code > . Highlights include:
2018-08-19 02:10:04 +02:00
< ul >
< li > < code > ./manage.py populate_db< / code > : Rebuilds database. Has options to e.g. create 3K users for testing.< / li >
< li > < code > ./manage.py mark_all_messages_unread< / code > : Useful for testing reading messages.< / li >
2022-03-21 05:53:35 +01:00
< li > < code > ./manage.py create_realm< / code > : Add a new realm. Useful for testing onboarding.< / li >
< li > < code > ./manage.py create_user< / code > : Add a new user. Useful for testing onboarding.< / li >
2018-08-19 02:10:04 +02:00
< li > < code > ./manage.py add_mock_conversation< / code > : 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.
< / li >
< / ul >
< / p >
< p > We also have
2019-11-07 18:29:05 +01:00
< a href = "https://zulip.readthedocs.io/en/latest/development/authentication.html" > documentation on testing LDAP, Google & GitHub authentication< / a > in the development environment.
2018-08-19 02:10:04 +02:00
< / p >
2020-06-29 07:23:36 +02:00
< h2 > Connecting to the local PostgreSQL database< / h2 >
< ul >
2021-11-20 13:25:41 +01:00
< li >
< code > ./manage.py dbshell< / code > : Connect to
PostgreSQL database via your terminal.
< / li >
< li >
< code > provision< / code > creates a < code > ~/.pgpass< / code > file,
so < code > psql -U zulip -h localhost< / code > works too.
< / li >
2020-06-29 07:23:36 +02:00
< li >
< p >
To connect using a graphical PostgreSQL client
like < a href = "https://www.pgadmin.org/" > pgAdmin< / a > ,
use the following credentials:
< / p >
< ul >
< li > Host: 127.0.0.1 (don't use localhost)< / li >
< li > Maintenance database: zulip< / li >
< li > Username: zulip< / li >
2020-12-07 03:41:43 +01:00
< li > password: stored as < code > local_database_password< / code > in < code > zulip/zproject/dev-secrets.conf< / code > < / li >
2020-06-29 07:23:36 +02:00
< / ul >
< / li >
< / ul >
2018-08-19 02:10:04 +02:00
< / div >
2017-06-14 02:01:01 +02:00
< / div >
{% endblock %}