flakytest.dev anze3db flakytest
Profiles / #14

Passed Run of Nov 11, 00:11

CI github-actions:test · 9bd5864 main dirty · pass/fail report
Some tests got too few samples to explain their time. Rerun with pytest --flakytest-profile --flakytest-rate 2000.
Wall time
33.65 s
1 worker
Test time
27.68 s
sum of test durations
Tests
254
254 passed
Profiler
tachyon
1000 Hz · 24,229 samples · Python 3.15.2 · flakytest 2026.0b1
Peak memory
181 MB
test process

Where the time goes

Test time by category
  • Database12.85 s
  • Libraries4.81 s
  • Migrations2.95 s
  • Password hashing2.11 s
  • DB schema1.46 s
  • Templates1.20 s
  • Imports619 ms
  • Unsampled450 ms
  • Deep copies340 ms
  • App code325 ms
  • Serialization245 ms
  • pytest227 ms
  • Test code39 ms
  • Factories19 ms
  • Waiting16 ms
  • Mocking4 ms
  • Cache2 ms
  • Logging2 ms

Session timeline

Tests
26.58 s
Startup
5.39 s
Collection
305 ms
Between tests
762 ms
Session teardown
423 ms
Test phases
Setup 5.60 s Call 21.89 s Teardown 186 ms

Fix next

Ranked by the time each fix saves per run
1

Run tests in parallel on all 2 CPUs

Tests run one at a time: 27.7s of test time on a 2-CPU machine. With pytest-xdist this could take about 13.8s.

High Parallelism
13.84 s per run
Fix: pip install pytest-xdist, then run pytest -n auto (add it to addopts, or only in CI). pytest-django creates a separate test database per worker automatically. Read the guide
Details

Tests must not share state: files in fixed paths, ports, a shared database without per-worker names, or module globals. Run with -p randomly first to shake out order dependencies.

Documentation

2

Use plain static file storage in tests

Static file storage/manifest handling costs 12.0s.

High App code
11.99 s per run
Fix: In test settings use STORAGES["staticfiles"] = {"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage"} so templates don't need a manifest. Read the guide
Details

Where:

  • apps/mcp/tests.py:67 McpTest.post · 542 ms
  • apps/api/tests.py:487 ProfileUploadTest.upload · 524 ms
  • apps/guides/content.py:112 render · 479 ms
  • ft/tests.py:204 TestAccountSettings.test_change_password · 464 ms
  • apps/orgs/tests.py:28 SignupTest.test_signing_up_creates_an_organization · 327 ms
  • ft/tests.py:160 TestAccountPages.test_signup · 288 ms
  • apps/projects/urls.py:498 project_profile · 234 ms
  • ft/tests.py:199 TestAccountSettings.test_change_password · 226 ms
  • apps/projects/tests.py:320 ProjectRunPage.test_other_peoples_project · 183 ms
  • apps/projects/urls.py:40 can_manage_project · 175 ms

Most affected tests:

  • apps/api/tests.py::ProfileUploadTest::test_missing_parts_mark_the_profile_incomplete
  • ft/tests.py::TestAccountSettings::test_change_password
  • apps/orgs/tests.py::SignupTest::test_signing_up_creates_an_organization
  • apps/api/tests.py::TestApiIndex::test_index
  • ft/tests.py::TestAccountPages::test_signup
  • apps/projects/tests.py::ProjectPagesTest::test_dashboard_filters
  • apps/projects/tests.py::ProjectRunPage::test_other_peoples_project
  • apps/orgs/tests.py::AccessTest::test_others_dont
3

Disable django-debug-toolbar in tests

django-debug-toolbar is installed in the test settings and costs 8.3s.

High App code
8.31 s per run
Fix: Only add debug_toolbar to INSTALLED_APPS and MIDDLEWARE when not testing (e.g. `if DEBUG and not TESTING:`). Read the guide
Details

Where:

  • apps/guides/content.py:112 render · 479 ms
  • ft/tests.py:204 TestAccountSettings.test_change_password · 464 ms
  • apps/orgs/tests.py:28 SignupTest.test_signing_up_creates_an_organization · 318 ms
  • ft/tests.py:160 TestAccountPages.test_signup · 288 ms
  • apps/projects/urls.py:498 project_profile · 234 ms
  • ft/tests.py:199 TestAccountSettings.test_change_password · 226 ms
  • apps/projects/urls.py:40 can_manage_project · 175 ms
  • apps/projects/urls.py:8 <module> · 174 ms
  • apps/projects/urls.py:49 find_project · 170 ms
  • ft/urls.py:45 index · 160 ms

Most affected tests:

  • apps/api/tests.py::ProfileUploadTest::test_missing_parts_mark_the_profile_incomplete
  • ft/tests.py::TestAccountSettings::test_change_password
  • apps/orgs/tests.py::SignupTest::test_signing_up_creates_an_organization
  • ft/tests.py::TestAccountPages::test_signup
  • apps/projects/tests.py::ProjectPagesTest::test_dashboard_filters
  • apps/api/tests.py::TestApiIndex::test_index
  • apps/projects/tests.py::SeedDemoCommandTest::test_seed_demo
  • apps/projects/tests.py::ProjectPagesTest::test_duplicate_tests_are_flagged

Documentation

4

Make the test database server skip durability work

Tests spend 17.3s (62%) in the database. Test databases don't need to survive a crash, so the server can skip flushing to disk.

High Database
3.45 s per run
Fix: For a PostgreSQL test server (Docker/CI service) start it with -c fsync=off -c synchronous_commit=off -c full_page_writes=off, and put its data directory on tmpfs; for MySQL use --innodb-flush-log-at-trx-commit=0 --skip-log-bin. Never on a server with data you need. Read the guide
Details

Only affects crash safety of the throwaway test server; query behaviour is identical.

Where:

  • apps/projects/models.py:466 Profile.save · 351 ms
  • apps/projects/tests.py:954 ProjectPagesTest.setUp · 251 ms
  • apps/api/tests.py:76 IngestStartEndpointTest.join_workers · 247 ms
  • apps/projects/environments.py:63 get_or_create_environment · 233 ms
  • apps/projects/profiles.py:352 write_snapshots · 232 ms
  • apps/projects/urls.py:40 can_manage_project · 175 ms
  • apps/projects/urls.py:49 find_project · 170 ms
  • apps/projects/models.py:35 next_number · 165 ms
  • apps/projects/profiles.py:497 write_perfs · 157 ms
  • apps/projects/models.py:18 get_or_create_numbered · 149 ms

Most affected tests:

  • apps/api/tests.py::TestApiIndex::test_index
  • apps/projects/tests.py::SeedDemoCommandTest::test_seed_demo
  • apps/api/tests.py::IngestStartEndpointTest::test_all_test_status_types
  • apps/api/tests.py::IngestStartEndpointTest::test_results_are_counted_and_the_payload_dropped
  • apps/api/tests.py::IngestStartEndpointTest::test_ingest_end_after_progress
  • apps/api/tests.py::IngestStartEndpointTest::test_ingest_progress_before_start
  • apps/projects/tests.py::ProjectPagesTest::test_configure_page
  • apps/api/tests.py::IngestStartEndpointTest::test_ingest_start_progress_end

Documentation

5

Repeated queries (N+1) in the code under test

27 tests run the same query 10+ times, e.g. 180x in test_seed_demo. N+1 queries slow the tests and production alike.

High Database
3.26 s per run
Fix: Django: fetch related rows in one query with select_related() for foreign keys and prefetch_related() for reverse/many-to-many relations, then lock the count in with assertNumQueries (or pytest-django's django_assert_num_queries). Read the guide
Details

This changes application code, so it speeds up production too; the tests stay as they are.

  • 180x in test_seed_demo: SELECT "projects_test"."id", "projects_test"."name", "projects_test"."project_id", "projects_test"."slug", "projects_test"."date_last_run", "projects_test"."date_first_seen", "projects_test"."first_commit_id", "projects_test"."muted" FROM "projects_test" WHERE ("projects_test"."name" = %s AND "proj…
  • 22x in test_dashboard_filters: SELECT "projects_environment"."id", "projects_environment"."project_id", "projects_environment"."name", "projects_environment"."kind", "projects_environment"."provider", "projects_environment"."details", "projects_environment"."date_first_seen", "projects_environment"."date_last_seen" FROM "project…
  • 21x in test_configure_page: SELECT "projects_profile"."id", "projects_profile"."project_id", "projects_profile"."number", "projects_profile"."environment_id", "projects_profile"."session_id", "projects_profile"."run_id", "projects_profile"."commit_id", "projects_profile"."ingest_id", "projects_profile"."external_id", "project…
  • 20x in test_index: SELECT "django_content_type"."model" AS "model" FROM "django_content_type" WHERE "django_content_type"."app_label" = %s
  • 20x in test_daily_stats_count_a_profile_once_every_part_is_in: SELECT "projects_profilepart"."id", "projects_profilepart"."profile_id", "projects_profilepart"."index", "projects_profilepart"."count", "projects_profilepart"."checksum", "projects_profilepart"."status", "projects_profilepart"."error", "projects_profilepart"."tests_count", "projects_profilepart"."…

Most affected tests:

  • apps/projects/tests.py::SeedDemoCommandTest::test_seed_demo
  • apps/projects/tests.py::ProjectPagesTest::test_dashboard_filters
  • apps/projects/tests.py::ProjectPagesTest::test_configure_page
  • apps/api/tests.py::TestApiIndex::test_index
  • apps/api/tests.py::ProfileUploadTest::test_daily_stats_count_a_profile_once_every_part_is_in
  • apps/api/tests.py::IngestStartEndpointTest::test_all_test_status_types
  • apps/api/tests.py::IngestStartEndpointTest::test_details_are_kept_for_failures_only
  • apps/api/tests.py::IngestStartEndpointTest::test_ingest_end_after_progress

Documentation

6

Stop re-running migrations on every test run

Migrations take 3.0s per run, before the first test can start.

Medium Migrations
2.66 s per run
Fix: Run with --reuse-db (add it to addopts in pytest.ini/pyproject) so the test database survives between runs; pass --create-db when migrations change. If no test depends on data migrations, --nomigrations builds the schema straight from the models, which is faster still. Read the guide
Details

CI should still build the database from scratch (no --reuse-db) so broken migrations are caught.

Where:

  • apps/projects/migrations/0025_backfill_slugs_and_numbers.py:24 forwards · 4 ms
  • apps/projects/migrations/0004_project_created_by_project_date_created_and_more.py:12 add_created_by_to_project · 3 ms
  • apps/projects/migrations/0014_backfill_session_counts.py:23 backfill · 3 ms
  • apps/projects/migrations/0022_backfill_organizations.py:48 forwards · 3 ms
  • apps/projects/migrations/0025_backfill_slugs_and_numbers.py:28 forwards · 3 ms
  • apps/projects/migrations/0025_backfill_slugs_and_numbers.py:35 forwards · 3 ms
  • apps/projects/migrations/0009_auto_20240218_1217.py:12 create_mute_objects · 1 ms
  • apps/projects/migrations/0012_backfill_session_environments.py:30 backfill · 1 ms
  • apps/projects/migrations/0018_profile_stats_applied.py:9 mark_applied · 1 ms
  • apps/projects/migrations/0022_backfill_organizations.py:27 forwards · 1 ms

Most affected tests:

  • apps/api/tests.py::TestApiIndex::test_index

Documentation

7

pytest takes a long time before the first test runs

Startup takes 5.4s and collection 305ms on every run, even when you only run one test.

Medium Imports
2.28 s per run
Fix: Set testpaths and norecursedirs (node_modules, .venv, build, docs) so pytest doesn't walk unrelated directories; move heavy imports out of module level in test files and conftest.py into fixtures; check `python -X importtime -m pytest --collect-only -q` for the slowest imports. Read the guide
Details
  • .venv/bin/pytest (305ms)
  • .venv/bin/pytest (5.4s)

Documentation

8

Use a fast password hasher in tests

2.1s (8% of test time) is spent hashing passwords. Slow hashing protects real passwords; in tests it only burns CPU.

Medium Password hashing
2.01 s per run
Fix: In your test settings set PASSWORD_HASHERS = ["django.contrib.auth.hashers.MD5PasswordHasher"] (currently PBKDF2PasswordHasher). Read the guide
Details

Only change the hasher in test settings. Tests that assert on a specific hash format need updating.

Where:

  • ft/tests.py:204 TestAccountSettings.test_change_password · 458 ms
  • ft/tests.py:160 TestAccountPages.test_signup · 277 ms
  • apps/orgs/tests.py:194 SuperuserTest.test_superusers_can_open_any_project_but_dont_list_them · 248 ms
  • apps/orgs/tests.py:28 SignupTest.test_signing_up_creates_an_organization · 245 ms
  • ft/tests.py:231 TestAccountSettings.test_projects_only_lists_your_own_even_for_superusers · 242 ms
  • ft/tests.py:199 TestAccountSettings.test_change_password · 224 ms
  • ft/tests.py:213 TestAccountSettings.test_change_password · 215 ms
  • ft/tests.py:176 TestAccountSettings.setUpTestData · 205 ms
  • apps/projects/tests.py:332 ProjectTestsPage.setUpTestData · 0.94 ms
  • apps/projects/tests.py:399 LegacyUrlTest.test_private_projects_stay_private · 0.83 ms

Most affected tests:

  • ft/tests.py::TestAccountSettings::test_change_password
  • ft/tests.py::TestAccountPages::test_signup
  • apps/orgs/tests.py::SuperuserTest::test_superusers_can_open_any_project_but_dont_list_them
  • apps/orgs/tests.py::SignupTest::test_signing_up_creates_an_organization
  • ft/tests.py::TestAccountSettings::test_projects_only_lists_your_own_even_for_superusers
  • apps/projects/tests.py::ProjectTestsPage::test_not_logged_in
  • apps/projects/tests.py::LegacyUrlTest::test_private_projects_stay_private

Documentation

9

Use TestCase instead of TransactionTestCase

1.2s goes to flushing every table after tests in 11 TransactionTestCase / transaction=True / live_server tests.

Medium DB schema
1.08 s per run
Fix: Use django.test.TestCase (or @pytest.mark.django_db without transaction=True): it wraps each test in a transaction and rolls back instead of truncating every table. Keep TransactionTestCase only for tests that need real commits (on_commit hooks can use TestCase.captureOnCommitCallbacks). Read the guide
Details

Tests that rely on commit behaviour, multiple connections or a live server still need a transactional test case.

Most affected tests:

  • apps/api/tests.py::IngestStartEndpointTest::test_results_are_counted_and_the_payload_dropped
  • apps/api/tests.py::IngestStartEndpointTest::test_ingest_multiple_sessions
  • apps/api/tests.py::IngestStartEndpointTest::test_ingest_start_progress_end
  • apps/api/tests.py::IngestStartEndpointTest::test_ingest_start_with_git
  • apps/api/tests.py::IngestStartEndpointTest::test_ingest_end_after_progress
  • apps/api/tests.py::IngestStartEndpointTest::test_all_test_status_types
  • apps/api/tests.py::ProfileUploadQueueTest::test_upload_is_processed_by_the_worker
  • apps/api/tests.py::IngestStartEndpointTest::test_ingest_progress_before_start

Documentation

10

Tests open new database connections over and over

Connecting to the database takes 1.2s.

Medium Database
921 ms per run
Fix: Reuse connections: create the engine once per session (not per test) and keep the default pool (NullPool reconnects on every checkout); in Django avoid closing connections in tests (connection.close()/close_old_connections). Read the guide
Details

Where:

  • apps/api/tests.py:76 IngestStartEndpointTest.join_workers · 214 ms
  • apps/api/tests.py:73 IngestStartEndpointTest.setUp · 96 ms
  • apps/api/tasks.py:266 warm_reports · 65 ms
  • apps/api/tasks.py:237 process_profile · 55 ms
  • apps/api/urls.py:72 api_request.<locals>.decorator.<locals>.wrapped_view · 54 ms
  • apps/api/tests.py:287 IngestStartEndpointTest.test_all_test_status_types · 25 ms
  • apps/api/tests.py:331 IngestStartEndpointTest.test_results_are_counted_and_the_payload_dropped · 12 ms
  • apps/api/tests.py:975 ProfileUploadQueueTest.setUp · 12 ms
  • apps/api/tests.py:235 IngestStartEndpointTest.test_ingest_progress_before_start · 11 ms
  • apps/api/tests.py:928 ProfileUploadLockTest.setUp · 11 ms

Most affected tests:

  • apps/api/tests.py::IngestStartEndpointTest::test_all_test_status_types
  • apps/api/tests.py::IngestStartEndpointTest::test_ingest_progress_before_start
  • apps/api/tests.py::IngestStartEndpointTest::test_ingest_end_after_progress
  • apps/api/tests.py::ProfileUploadQueueTest::test_upload_is_processed_by_the_worker
  • apps/api/tests.py::IngestStartEndpointTest::test_results_are_counted_and_the_payload_dropped
  • apps/api/tests.py::IngestStartEndpointTest::test_ingest_start_progress_end
  • apps/api/tests.py::IngestStartEndpointTest::test_details_are_kept_for_failures_only
  • apps/projects/tests.py::AnalyticsTest::test_category_breakdown
11

Create shared test data in setUpTestData instead of setUp

setUp() runs before every test and takes 988ms in total (db 921ms, library 55ms, factories 8ms) in 14 classes: SettingsTest (3 tests), ProjectsPageTest (5 tests), ProjectEditPage (6 tests), ProjectDeletePage (4 tests).

Low Database
692 ms per run
Fix: Move object creation that tests only read from setUp() into `@classmethod def setUpTestData(cls)`: it runs once per class and each test still sees the original rows (TestCase rolls back to a savepoint). Read the guide
Details

Since Django 3.2 attributes assigned in setUpTestData are deep-copied per test, so in-memory changes don't leak between tests. Keep objects a test modifies in the database (or re-fetches) as before.

Where:

  • apps/projects/tests.py:954 ProjectPagesTest.setUp · 266 ms
  • apps/api/tests.py:73 IngestStartEndpointTest.setUp · 149 ms
  • apps/projects/tests.py:188 ProjectDeletePage.setUp · 83 ms
  • apps/projects/tests.py:219 ProjectCreatePage.setUp · 81 ms
  • apps/projects/tests.py:101 ProjectsPageTest.setUp · 68 ms
  • apps/projects/tests.py:143 ProjectEditPage.setUp · 65 ms
  • apps/projects/tests.py:413 TestProjectTestPage.setUp · 49 ms
  • apps/projects/tests.py:1429 MemoryTest.setUp · 41 ms
  • apps/projects/tests.py:269 ProjectRunsPage.setUp · 38 ms
  • ft/tests.py:180 TestAccountSettings.setUp · 29 ms

Most affected tests:

  • apps/projects/tests.py::ProjectDeletePage::test_project
  • apps/projects/tests.py::ProjectPagesTest::test_htmx_refresh_run_row
  • apps/projects/tests.py::ProjectCreatePage::test_invalid_form
  • apps/projects/tests.py::ProjectCreatePage::test_not_logged_in
  • apps/projects/tests.py::ProjectDeletePage::test_other_peoples_project
  • apps/projects/tests.py::ProjectsPageTest::test_not_logged_in
  • apps/projects/tests.py::ProjectPagesTest::test_tests_page
  • apps/projects/tests.py::ProjectPagesTest::test_projects_page

Documentation

Tests

201–254 of 254, slowest first · click a column to sort this page
Test Outcome Duration Setup Call Teardown Mostly Queries
apps/api/tests.py::ProfileUploadTest::test_reject_too_large_uncompressed
passed 36 ms 0.80 ms 35 ms 0.18 ms Libraries 10
apps/api/tests.py::ProfileUploadTest::test_no_token
passed 34 ms 0.78 ms 33 ms 0.17 ms Database 6
apps/mcp/tests.py::McpTest::test_get_not_allowed
passed 34 ms 0.71 ms 33 ms 0.15 ms Libraries 5
apps/projects/tests.py::SlugsAndNumbersTest::test_a_taken_number_is_retried
passed 31 ms 19 ms 12 ms 0.14 ms Database 24
3 repeated
apps/projects/tests.py::AnalyticsTest::test_single_test
passed 31 ms 0.69 ms 30 ms 0.20 ms Database 16
9 repeated
apps/projects/tests.py::AnalyticsTest::test_slow_tests_per_environment
passed 29 ms 0.70 ms 28 ms 0.23 ms Database 24
13 repeated
apps/guides/tests.py::TestContent::test_links_to_the_site_resolve
passed 28 ms 0.78 ms 27 ms 0.20 ms pytest 5
apps/projects/tests.py::AnalyticsTest::test_overview
passed 21 ms 0.64 ms 20 ms 0.17 ms Database 17
apps/orgs/tests.py::SlugTest::test_unique_and_not_reserved
passed 21 ms 13 ms 7 ms 0.56 ms Database 11
5 repeated
apps/orgs/tests.py::SignupTest::test_github_login_names_it
passed 20 ms 10 ms 9 ms 0.15 ms Database 11
apps/projects/tests.py::AnalyticsTest::test_compare_environments
passed 19 ms 0.67 ms 18 ms 0.17 ms Database 11
apps/projects/tests.py::SlugsAndNumbersTest::test_runs_and_profiles_are_numbered_per_project
passed 19 ms 0.65 ms 18 ms 0.20 ms Database 23
6 repeated
apps/projects/tests.py::SlugsAndNumbersTest::test_upsert_keeps_slugs_and_makes_them_unique
passed 18 ms 0.64 ms 16 ms 2 ms Database 16
6 repeated
apps/projects/tests.py::RealProfileDocumentTest::test_processed
passed 17 ms 0.56 ms 15 ms 1 ms Database 13
3 repeated
apps/guides/tests.py::TestContent::test_an_insight_has_one_guide
passed 17 ms 11 ms 6 ms 0.14 ms Database 5
apps/projects/tests.py::MemoryTest::test_memory_tests_are_ranked_by_average_peak
passed 15 ms 0.76 ms 15 ms 0.14 ms Database 22
apps/projects/tests.py::AnalyticsTest::test_ci_vs_local
passed 15 ms 0.75 ms 14 ms 0.21 ms Database 13
apps/projects/tests.py::MemoryTest::test_stored_and_summed_per_day
passed 14 ms 0.69 ms 13 ms 0.62 ms Database 23
apps/projects/tests.py::FlakyReportTest::test_report_by_environment_kind
passed 14 ms 0.79 ms 13 ms 0.18 ms Database 14
apps/api/tests.py::ProfileUploadTest::test_processing_failure_is_recorded
passed 13 ms 0.71 ms 13 ms 0.19 ms Unsampled 15
3 repeated
apps/projects/tests.py::FlakyReportTest::test_window
passed 13 ms 0.69 ms 11 ms 0.62 ms Database 13
apps/projects/tests.py::ClassifyStreaksTest::test_dirty_runs_are_not_the_same_commit
passed 13 ms 10 ms 2 ms 0.14 ms Database 5
apps/guides/tests.py::TestContent::test_front_matter
passed 12 ms 0.67 ms 11 ms 0.18 ms Test code 5
apps/projects/tests.py::FlakyReportTest::test_single_test
passed 12 ms 0.69 ms 11 ms 0.15 ms Database 11
apps/projects/tests.py::StorageTest::test_slow_tests_come_from_daily_stats
passed 11 ms 0.87 ms 10 ms 0.14 ms Database 11
apps/projects/tests.py::AnalyticsTest::test_slow_tests
passed 11 ms 0.74 ms 10 ms 0.17 ms Database 10
apps/projects/tests.py::AnalyticsTest::test_resolve_scope
passed 9 ms 0.69 ms 8 ms 0.17 ms Database 11
6 repeated
apps/projects/tests.py::RealProfileDocumentTest::test_entry_details
passed 9 ms 0.58 ms 8 ms 0.43 ms Database 5
apps/projects/tests.py::AnalyticsTest::test_fix_next
passed 9 ms 0.58 ms 8 ms 0.14 ms Database 8
apps/projects/tests.py::StorageTest::test_snapshot_renders_like_the_whole_document
passed 8 ms 0.53 ms 7 ms 0.61 ms Database 9
apps/projects/tests.py::AnalyticsTest::test_environment_rows
passed 8 ms 0.72 ms 7 ms 0.16 ms Database 8
apps/projects/tests.py::AnalyticsTest::test_ci_vs_local_needs_both
passed 7 ms 0.72 ms 6 ms 0.20 ms Database 9
apps/projects/tests.py::StorageTest::test_daily_stats_sum_the_days_results
passed 6 ms 0.68 ms 6 ms 0.14 ms Database 8
apps/guides/tests.py::TestContent::test_every_insight_has_a_guide
passed 6 ms 0.57 ms 6 ms 0.16 ms Database 5
apps/projects/tests.py::AnalyticsTest::test_suite_trend
passed 6 ms 0.78 ms 4 ms 0.68 ms Database 6
apps/projects/tests.py::RealProfileDocumentTest::test_flat_stacks_still_work
passed 5 ms 0.56 ms 4 ms 0.13 ms Database 5
apps/projects/tests.py::ClassifyStreaksTest::test_test_changed_matches_paths_relative_to_the_repository
passed 3 ms 1 ms 2 ms 0.12 ms Database 5
apps/guides/tests.py::TestContent::test_unknown_insights
passed 3 ms 0.68 ms 2 ms 0.54 ms Unsampled 5
apps/projects/tests.py::ClassifyStreaksTest::test_test_changed_when_the_test_file_changed
passed 3 ms 0.61 ms 1 ms 0.58 ms Database 5
apps/projects/tests.py::SlugsAndNumbersTest::test_test_slugs_read_like_their_node_ids
passed 3 ms 0.70 ms 2 ms 0.16 ms Unsampled 5
apps/projects/tests.py::ClassifyStreaksTest::test_environment_kinds_are_counted
passed 3 ms 0.66 ms 2 ms 0.13 ms Database 5
apps/projects/tests.py::ClassifyStreaksTest::test_regression_caught_when_app_code_fixed_it
passed 2 ms 0.63 ms 2 ms 0.13 ms Database 5
apps/projects/tests.py::ClassifyStreaksTest::test_multiple_streaks_in_order
passed 2 ms 0.54 ms 2 ms 0.17 ms Database 5
apps/projects/tests.py::ClassifyStreaksTest::test_flaky_when_failed_and_passed_on_same_commit
passed 2 ms 0.52 ms 2 ms 0.16 ms Unsampled 5
apps/projects/tests.py::ClassifyStreaksTest::test_flaky_even_if_the_pass_came_first_and_elsewhere
passed 2 ms 0.69 ms 2 ms 0.16 ms Database 5
apps/projects/tests.py::ClassifyStreaksTest::test_resolved_without_changed_files
passed 2 ms 0.66 ms 2 ms 0.14 ms Database 5
apps/projects/tests.py::ClassifyStreaksTest::test_ongoing
passed 2 ms 0.58 ms 2 ms 0.13 ms Database 5
apps/projects/tests.py::ClassifyStreaksTest::test_no_failures
passed 2 ms 0.68 ms 1 ms 0.14 ms Unsampled 5
apps/projects/tests.py::MigrationInsightsTest::test_per_runner
passed 2 ms 1 ms 0.28 ms 0.14 ms pytest –
apps/projects/tests.py::MigrationInsightsTest::test_per_runner_needs_several_runners
passed 1 ms 0.65 ms 0.22 ms 0.14 ms Unsampled –
apps/projects/tests.py::MigrationInsightsTest::test_per_worker_tolerates_bad_fixture_data
passed 0.98 ms 0.63 ms 0.18 ms 0.17 ms Unsampled –
apps/projects/tests.py::MigrationInsightsTest::test_per_worker_needs_repeated_builds
passed 0.94 ms 0.57 ms 0.23 ms 0.15 ms Unsampled –
apps/projects/tests.py::MigrationInsightsTest::test_per_worker
passed 0.91 ms 0.51 ms 0.24 ms 0.15 ms Unsampled –
apps/projects/tests.py::MigrationInsightsTest::test_per_worker_ignores_cheap_setups
passed 0.90 ms 0.62 ms 0.17 ms 0.11 ms pytest –

Slowest fixtures

Exact setup time across the session
Fixture Scope Calls Total Max
_django_setup_unittest class 54 3.25 s 3.24 s
django_db_setup session 1 3.24 s 3.24 s
_unittest_setUpClass_fixture_ProjectPagesTest class 1 287 ms 287 ms
_unittest_setUpClass_fixture_TestAccountSettings class 1 220 ms 220 ms
_unittest_setUpClass_fixture_ProfilePagePaginationTest class 1 216 ms 216 ms
_unittest_setUpClass_fixture_AnalyticsTest class 1 200 ms 200 ms
_unittest_setUpClass_fixture_McpTest class 1 187 ms 187 ms
_unittest_setUpClass_fixture_RealProfileDocumentTest class 1 147 ms 147 ms
_unittest_setUpClass_fixture_MemoryTest class 1 88 ms 88 ms
_unittest_setUpClass_fixture_StorageTest class 1 82 ms 82 ms
_unittest_setUpClass_fixture_FlakyReportTest class 1 69 ms 69 ms
_unittest_setUpClass_fixture_LegacyUrlTest class 1 66 ms 66 ms
_unittest_setUpClass_fixture_UnstorableCharactersTest class 1 57 ms 57 ms
_unittest_setUpClass_fixture_FlakyReportCacheTest class 1 53 ms 53 ms
_unittest_setUpClass_fixture_IngestEnvironmentTest class 1 22 ms 22 ms