Skip to content

Commit 85a7216

Browse files
devGregAMaffoochclaude
authored
Fixes, expands, and modifies E2E tests (#14329)
* Fixes, expands, and modifies E2E tests * Fix Ruff * Remove platform specification from integration tests * Hook up new tests to CICD * refactor(tests): remove obsolete test cases from integration tests * refactor(tests): remove obsolete test cases from integration tests * refactor(tests): remove obsolete finding_image.png test case from integration tests * Fix metadata test failures: use formset field IDs and correct submit button Both product_metadata_test.py and endpoint_extended_test.py were using id_name/id_value as form field IDs, but DefectDojo metadata forms use Django formsets which prefix fields as id_form-0-name/id_form-0-value. Also fixed submit button selector from input.btn.btn-primary to button.btn.btn-success matching the actual template. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(tests): use direct URL navigation for product metadata test The product page dropdown uses "Add Custom Fields" link text (not "Add Metadata" like the endpoint page), causing NoSuchElementException. Navigate directly to product/{pid}/add_meta_data and edit_meta_data URLs instead, which works across both V3 and non-V3 modes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Cody Maffucci <46459665+Maffooch@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 28dac95 commit 85a7216

37 files changed

Lines changed: 3567 additions & 45 deletions

.github/workflows/integration-tests.yml

Lines changed: 54 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,70 @@ jobs:
1111
strategy:
1212
matrix:
1313
test-case: [
14-
"tests/finding_test.py",
15-
"tests/report_builder_test.py",
16-
"tests/notes_test.py",
17-
"tests/regulations_test.py",
18-
"tests/product_type_test.py",
19-
"tests/product_test.py",
14+
"openapi-validatator",
15+
"tests/action_history_test.py",
16+
"tests/alerts_test.py",
17+
"tests/announcement_banner_test.py",
18+
"tests/banner_test.py",
19+
"tests/base_test_class.py",
20+
"tests/benchmark_test.py",
21+
"tests/calendar_test.py",
22+
"tests/check_various_pages.py",
23+
"tests/close_old_findings_dedupe_test.py",
24+
"tests/close_old_findings_test.py",
25+
"tests/credential_test.py",
26+
"tests/dashboard_test.py",
27+
"tests/dedupe_test.py",
28+
"tests/endpoint_extended_test.py",
2029
"tests/endpoint_test.py",
30+
"tests/engagement_checklist_test.py",
31+
"tests/engagement_export_test.py",
32+
"tests/engagement_extended_test.py",
33+
"tests/engagement_presets_test.py",
2134
"tests/engagement_test.py",
2235
"tests/environment_test.py",
23-
"tests/test_test.py",
24-
"tests/user_test.py",
36+
"tests/false_positive_history_test.py",
37+
"tests/file_test.py",
38+
"tests/finding_extended_test.py",
39+
"tests/finding_group_test.py",
40+
"tests/finding_test.py",
2541
"tests/group_test.py",
42+
"tests/login_test.py",
43+
"tests/metrics_extended_test.py",
44+
"tests/note_type_test.py",
45+
"tests/notes_test.py",
46+
"tests/notification_webhook_test.py",
47+
"tests/notifications_test.py",
48+
"tests/object_test.py",
49+
"tests/product_credential_test.py",
2650
"tests/product_group_test.py",
27-
"tests/product_type_group_test.py",
2851
"tests/product_member_test.py",
52+
"tests/product_metadata_test.py",
53+
"tests/product_tag_metrics_test.py",
54+
"tests/product_test.py",
55+
"tests/product_type_group_test.py",
2956
"tests/product_type_member_test.py",
30-
"tests/ibm_appscan_test.py",
57+
"tests/product_type_test.py",
58+
"tests/questionnaire_advanced_test.py",
59+
"tests/questionnaire_test.py",
60+
"tests/regulations_test.py",
61+
"tests/reimport_scan_test.py",
62+
"tests/report_builder_test.py",
63+
"tests/risk_acceptance_test.py",
3164
"tests/search_test.py",
32-
"tests/file_test.py",
33-
"tests/dedupe_test.py",
34-
"tests/announcement_banner_test.py",
35-
"tests/close_old_findings_dedupe_test.py",
36-
"tests/close_old_findings_test.py",
37-
"tests/false_positive_history_test.py",
38-
"tests/check_various_pages.py",
65+
"tests/sla_configuration_test.py",
66+
"tests/system_settings_test.py",
67+
"tests/test_copy_test.py",
68+
"tests/test_test.py",
69+
"tests/test_type_test.py",
70+
"tests/threat_model_test.py",
71+
"tests/tool_config.py",
72+
"tests/tool_product_test.py",
73+
"tests/tool_type_test.py",
74+
"tests/user_profile_test.py",
75+
"tests/user_test.py",
3976
# "tests/import_scanner_test.py",
4077
# "tests/zap.py",
41-
"tests/notifications_test.py",
42-
"tests/tool_config.py",
43-
"openapi-validatator",
4478
]
4579
os: [alpine, debian]
4680
v3_feature_locations: [true, false]

docker/entrypoint-integration-tests.sh

Lines changed: 272 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,278 @@ else
296296
fail "$test"
297297
fi
298298

299+
test="Note Type integration tests"
300+
echo "Running: $test"
301+
if python3 tests/note_type_test.py ; then
302+
success "$test"
303+
else
304+
fail "$test"
305+
fi
306+
307+
test="SLA Configuration integration tests"
308+
echo "Running: $test"
309+
if python3 tests/sla_configuration_test.py ; then
310+
success "$test"
311+
else
312+
fail "$test"
313+
fi
314+
315+
test="Dashboard integration tests"
316+
echo "Running: $test"
317+
if python3 tests/dashboard_test.py ; then
318+
success "$test"
319+
else
320+
fail "$test"
321+
fi
322+
323+
test="Login integration tests"
324+
echo "Running: $test"
325+
if python3 tests/login_test.py ; then
326+
success "$test"
327+
else
328+
fail "$test"
329+
fi
330+
331+
test="Alerts integration tests"
332+
echo "Running: $test"
333+
if python3 tests/alerts_test.py ; then
334+
success "$test"
335+
else
336+
fail "$test"
337+
fi
338+
339+
test="System Settings integration tests"
340+
echo "Running: $test"
341+
if python3 tests/system_settings_test.py ; then
342+
success "$test"
343+
else
344+
fail "$test"
345+
fi
346+
347+
test="Credential integration tests"
348+
echo "Running: $test"
349+
if python3 tests/credential_test.py ; then
350+
success "$test"
351+
else
352+
fail "$test"
353+
fi
354+
355+
test="Engagement Extended integration tests"
356+
echo "Running: $test"
357+
if python3 tests/engagement_extended_test.py ; then
358+
success "$test"
359+
else
360+
fail "$test"
361+
fi
362+
363+
test="Finding Extended integration tests"
364+
echo "Running: $test"
365+
if python3 tests/finding_extended_test.py ; then
366+
success "$test"
367+
else
368+
fail "$test"
369+
fi
370+
371+
test="Test Copy integration tests"
372+
echo "Running: $test"
373+
if python3 tests/test_copy_test.py ; then
374+
success "$test"
375+
else
376+
fail "$test"
377+
fi
378+
379+
test="Endpoint Extended integration tests"
380+
echo "Running: $test"
381+
if python3 tests/endpoint_extended_test.py ; then
382+
success "$test"
383+
else
384+
fail "$test"
385+
fi
386+
387+
test="Calendar integration tests"
388+
echo "Running: $test"
389+
if python3 tests/calendar_test.py ; then
390+
success "$test"
391+
else
392+
fail "$test"
393+
fi
394+
395+
test="Finding Group integration tests"
396+
echo "Running: $test"
397+
if python3 tests/finding_group_test.py ; then
398+
success "$test"
399+
else
400+
fail "$test"
401+
fi
402+
403+
test="Engagement Presets integration tests"
404+
echo "Running: $test"
405+
if python3 tests/engagement_presets_test.py ; then
406+
success "$test"
407+
else
408+
fail "$test"
409+
fi
410+
411+
test="Questionnaire integration tests"
412+
echo "Running: $test"
413+
if python3 tests/questionnaire_test.py ; then
414+
success "$test"
415+
else
416+
fail "$test"
417+
fi
418+
419+
test="Benchmark integration tests"
420+
echo "Running: $test"
421+
if python3 tests/benchmark_test.py ; then
422+
success "$test"
423+
else
424+
fail "$test"
425+
fi
426+
427+
test="Notification Webhook integration tests"
428+
echo "Running: $test"
429+
if python3 tests/notification_webhook_test.py ; then
430+
success "$test"
431+
else
432+
fail "$test"
433+
fi
434+
435+
test="Threat Model integration tests"
436+
echo "Running: $test"
437+
if python3 tests/threat_model_test.py ; then
438+
success "$test"
439+
else
440+
fail "$test"
441+
fi
442+
443+
test="Product Tag Metrics integration tests"
444+
echo "Running: $test"
445+
if python3 tests/product_tag_metrics_test.py ; then
446+
success "$test"
447+
else
448+
fail "$test"
449+
fi
450+
451+
test="Object integration tests"
452+
echo "Running: $test"
453+
if python3 tests/object_test.py ; then
454+
success "$test"
455+
else
456+
fail "$test"
457+
fi
458+
459+
test="Tool Type integration tests"
460+
echo "Running: $test"
461+
if python3 tests/tool_type_test.py ; then
462+
success "$test"
463+
else
464+
fail "$test"
465+
fi
466+
467+
test="Tool Product integration tests"
468+
echo "Running: $test"
469+
if python3 tests/tool_product_test.py ; then
470+
success "$test"
471+
else
472+
fail "$test"
473+
fi
474+
475+
test="Risk Acceptance integration tests"
476+
echo "Running: $test"
477+
if python3 tests/risk_acceptance_test.py ; then
478+
success "$test"
479+
else
480+
fail "$test"
481+
fi
482+
483+
test="Product Metadata integration tests"
484+
echo "Running: $test"
485+
if python3 tests/product_metadata_test.py ; then
486+
success "$test"
487+
else
488+
fail "$test"
489+
fi
490+
491+
test="Product Credential integration tests"
492+
echo "Running: $test"
493+
if python3 tests/product_credential_test.py ; then
494+
success "$test"
495+
else
496+
fail "$test"
497+
fi
498+
499+
test="Test Type integration tests"
500+
echo "Running: $test"
501+
if python3 tests/test_type_test.py ; then
502+
success "$test"
503+
else
504+
fail "$test"
505+
fi
506+
507+
test="User Profile integration tests"
508+
echo "Running: $test"
509+
if python3 tests/user_profile_test.py ; then
510+
success "$test"
511+
else
512+
fail "$test"
513+
fi
514+
515+
test="Engagement Checklist integration tests"
516+
echo "Running: $test"
517+
if python3 tests/engagement_checklist_test.py ; then
518+
success "$test"
519+
else
520+
fail "$test"
521+
fi
522+
523+
test="Questionnaire Advanced integration tests"
524+
echo "Running: $test"
525+
if python3 tests/questionnaire_advanced_test.py ; then
526+
success "$test"
527+
else
528+
fail "$test"
529+
fi
530+
531+
test="Engagement Export integration tests"
532+
echo "Running: $test"
533+
if python3 tests/engagement_export_test.py ; then
534+
success "$test"
535+
else
536+
fail "$test"
537+
fi
538+
539+
test="Action History integration tests"
540+
echo "Running: $test"
541+
if python3 tests/action_history_test.py ; then
542+
success "$test"
543+
else
544+
fail "$test"
545+
fi
546+
547+
test="Reimport Scan integration tests"
548+
echo "Running: $test"
549+
if python3 tests/reimport_scan_test.py ; then
550+
success "$test"
551+
else
552+
fail "$test"
553+
fi
554+
555+
test="Banner Configuration integration tests"
556+
echo "Running: $test"
557+
if python3 tests/banner_test.py ; then
558+
success "$test"
559+
else
560+
fail "$test"
561+
fi
562+
563+
test="Metrics Extended integration tests"
564+
echo "Running: $test"
565+
if python3 tests/metrics_extended_test.py ; then
566+
success "$test"
567+
else
568+
fail "$test"
569+
fi
570+
299571
test="Tool Config integration tests"
300572
echo "Running: $test"
301573
if python3 tests/tool_config.py ; then

0 commit comments

Comments
 (0)