• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 3 fuera de 30 páginas
Otro

WGU D385 Pytest & Security Unit Testing Workbook | 48 Practice Tests, Python Security, API Testing & Vulnerability Verification | 2026

Document preview thumbnail
Vista previa 3 fuera de 30 páginas

Prepare for WGU D385 – Software Security and Testing with this detailed Pytest & Security Unit Testing Workbook, created for students who want practical experience with security-focused testing, Python unit tests, API validation, and vulnerability verification. This workbook contains 48 original practice tests covering the major testing patterns needed to strengthen software security skills, including positive and negative testing, boundary conditions, invalid input, exception handling, authentication, authorization, API responses, regression testing, parameterized tests, and expected-vs-actual behavior. The resource is designed to help students understand not only how to write a test, but also why the test matters, what security behavior it verifies, and how testing confirms that a vulnerability has actually been fixed. What’s Included 48 original pytest practice tests Positive test cases Negative test cases Boundary-condition testing Invalid-input testing Exception testing Authentication testing Authorization testing Role-based access testing API response validation Security regression testing Parameterized pytest examples Expected-vs-actual behavior checks Vulnerability verification Password-security tests Token and session testing Secure-input validation tests Error-handling tests Original Python security application Complete pytest practice suite Test-results matrix Remediation verification examples Independent practice exercises Security-testing reasoning Final readiness checklist Why This Workbook Is Useful This guide helps students build confidence with the full security-testing workflow: Identify behavior → Write the test → Run the test → Compare expected vs. actual → Fix the weakness → Retest → Verify the vulnerability stays fixed It is especially useful for reviewing: Pytest | Unit Testing | Security Testing | Authentication | Authorization | API Responses | Input Validation | Exceptions | Regression Testing | Parameterized Tests | Vulnerability Remediation Best For WGU D385 Software Security and Testing D385 security-testing practice Python pytest review Unit-testing practice API-security testing Authentication and authorization testing Vulnerability-remediation verification Secure-coding validation Regression-testing practice Updated for 2026 study preparation.

Vista previa del contenido

WGU D385 - Pytest & Security Unit Testing Practice Workbook | 2026




WGU D385
Pytest & Security Unit Testing Workbook
48 Original, Executed & Passing Tests
Positive • Negative • Boundary • Exceptions • Authentication • Authorization • API • Regression •
Parameterized Testing




VERIFIED RUN: The complete included pytest suite was executed in a clean local run: 48 passed. The workbook
records expected results and uses the verified execution as the actual result for each case.




ALIGNMENT: Built as an original practice workbook for WGU D385 Software Security and Testing. The September
2026 catalog describes D385 as recognizing software vulnerabilities, planning interventions, and developing and
testing those interventions, with coverage of Web security, permissions and identity security, debugging, log-file
analysis, API security, encryption, and cryptography. This workbook concentrates on testing and verification skills
that support those areas.




IMPORTANT: This is an independent study and practice resource. It is not an official WGU assessment, rubric,
answer key, or guaranteed-pass submission. Pytest is used here as a practical testing framework; the catalog does
not prescribe Pytest specifically.




September 2026 Edition




Page 1

, WGU D385 - Pytest & Security Unit Testing Practice Workbook | 2026



Contents
1. 1. September 2026 D385 Alignment and Workbook Scope
2. 2. Testing Strategy: From Requirement to Evidence
3. 3. Practice Application Architecture
4. 4. Running Pytest and Reading Results
5. 5. Tests 1-5: Positive Behavior
6. 6. Tests 6-12: Negative and Invalid Input
7. 7. Tests 13-17: Boundary Conditions
8. 8. Tests 18-22: Exception Behavior
9. 9. Tests 23-29: Authentication
10. 10. Tests 30-34: Authorization
11. 11. Tests 35-39: API Response Contracts
12. 12. Tests 40-44: Security Regression Verification
13. 13. Tests 45-48: Parameterized Expected-vs-Actual Testing
14. 14. Complete 48-Test Results Matrix
15. 15. Full Practice Application Source Code
16. 16. Full Pytest Suite
17. 17. Independent Practice Challenges
18. 18. Answer Guide and Remediation Thinking
19. 19. Final Readiness Checklist and References




Page 2

, WGU D385 - Pytest & Security Unit Testing Practice Workbook | 2026



1. September 2026 D385 Alignment and Workbook Scope
The September 2026 WGU Institutional Catalog describes D385 - Software Security and Testing as a course that
prepares learners to recognize security vulnerabilities, plan interventions, and develop and test those
interventions. The catalog also names Web security, permissions and identity security, debugging, log-file
analysis, API security, encryption, and cryptography as course topics.

This workbook focuses on the “develop and test interventions” portion of that scope. Its mini-application
deliberately includes identity, authentication, authorization, API-like responses, input validation, password
handling, sessions, and security regression checks so that the tests demonstrate both ordinary correctness and
security-focused verification.

Scope boundary: The workbook does not claim to reproduce a WGU task. It uses original Python code and original
test cases to practice software security and testing skills in a way that is consistent with the published course
description.



Learning objectives
 Distinguish positive, negative, boundary, exception, authentication, authorization, API contract, and
regression tests.
 Write pytest assertions that compare expected and actual behavior clearly.
 Use fixtures to isolate test state and reduce duplication.
 Validate secure error behavior without leaking sensitive implementation details.
 Prove that remediated vulnerabilities remain fixed through regression tests.
 Use parameterization to increase coverage without repetitive test code.
 Read a pytest execution summary and connect each passing test to a requirement or security control.



2. Testing Strategy: From Requirement to Evidence
A strong security test starts with a requirement, identifies the risk if the requirement fails, executes a controlled
action, and records evidence that the observed result matches the expected result. This workbook uses the
following cycle:

1. Define the behavior or control.

2. Choose a representative valid, invalid, or edge-case input.

3. Arrange isolated state.

4. Act by calling the function or API-like endpoint.

5. Assert the expected status, exception, field, or security property.

6. Interpret the result as evidence.

7. Retain the test as a regression guard after remediation.

Core test categories
Category Purpose

Positive tests Confirm that valid inputs and allowed actions work.

Negative tests Confirm that invalid inputs and prohibited actions fail safely.

Boundary tests Exercise values at, just below, or just above allowed limits.

Exception tests Verify that abnormal conditions produce controlled, meaningful



Page 3

Información del documento

Subido en
10 de septiembre de 2026
Número de páginas
30
Escrito en
2026/2027
Tipo
Otro
Personaje
Desconocido
$18.99

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
EvaTee
3.9
(990)
Vendido
5490
Seguidores
3584
Artículos
59527
Última venta
3 horas hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes