Cisco 200-901 Practice Test 3
Question 20
For an original CCNA Automation educational scenario, consider: A deployment job loads XML interface entries and assumes the parsed element tree is the same type as a JSON dictionary. Select TWO complementary steps: the targeted correction and its strongest prechange validation.
- Change: Trace the offending change through Git history and use a reviewed revert or targeted corrective commit rather than rewriting shared history.
- Check: Examine git status, branch, log and diff before merging and verify the test suite on the reconciled final tree.
- Call dict.get on every decoded JSON value without checking whether the root is actually a list.
- Change: Use a format-specific Python parser, inspect the returned container types and select nested values using the correct list, dict or element access.
- Check: Inspect type, length and sample nested elements from each payload, including a missing or null field, before iterating device records.
Explanation
Correct Answer
D:Evidence: Inspect type, length and sample nested elements from each payload, including a missing or null field, before iterating device records.
E:Acceptance: Device IDs and properties are extracted consistently and missing fields follow deliberate error handling rather than type errors.
Incorrect Answers
A:Change: Trace the offending change through Git history and use a reviewed revert or targeted corrective commit rather than rewriting shared history. A deployment job loads XML interface entries and assumes the parsed element tree is the same type as a JSON dictionary.
B:Check: Examine git status, branch, log and diff before merging and verify the test suite on the reconciled final tree. Json.loads maps JSON arrays to Python lists and objects to dictionaries; XML element parsing requires navigating tags, attributes and text.
C:Call dict.get on every decoded JSON value without checking whether the root is actually a list. json.loads maps JSON arrays to Python lists and objects to dictionaries; XML element parsing requires navigating tags, attributes and text. Use this instead: Use a format-specific Python parser, inspect the returned container types and select nested values using the correct list, dict or element access. Distinguish the two approaches by checking: Inspect type, length and sample nested elements from each payload, including a missing or null field, before iterating device records.
Question 21
A network automation engineer is examining this network automation situation: A developer changes a configuration push routine and only discovers that it accepts invalid IP prefixes after running against production switches. A proposed shortcut is: Treat a successful production API call as a substitute for repeatable pre-deployment unit tests. What should the network automation engineer recommend as the narrowly scoped correction? Select ONE best answer.
- Trace the offending change through Git history and use a reviewed revert or targeted corrective commit rather than rewriting shared history.
- Treat a successful production API call as a substitute for repeatable pre-deployment unit tests.
- Encapsulate reusable API operations as functions and modules, and model stateful device clients with narrowly scoped class instances where appropriate.
- Write a failing focused test for the required behavior and edge case, implement the minimum fix and rerun the automated regression suite before deployment.
Explanation
Correct Answer
D:Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes.
Incorrect Answers
A:Trace the offending change through Git history and use a reviewed revert or targeted corrective commit rather than rewriting shared history. Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes.
B:Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes.
C:Encapsulate reusable API operations as functions and modules, and model stateful device clients with narrowly scoped class instances where appropriate. Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes.
Question 22
A Cisco network automation implementation review finds: A developer changes a configuration push routine and only discovers that it accepts invalid IP prefixes after running against production switches. The team proposes: Write a failing focused test for the required behavior and edge case, implement the minimum fix and rerun the automated regression suite before deployment. Which engineering principle most strongly supports the recommended response? Select ONE best answer.
- Version-control history supports reproducible diffs, accountability and safe undo; reverting a commit adds an inverse change without deleting later shared commits.
- Git commits capture repository snapshots, branches isolate lines of work, and merge conflict resolution reconciles competing edits rather than silently choosing an arbitrary version.
- Refactoring improves code structure while preserving externally observable behavior; regression tests detect accidental functional changes during internal redesign.
- Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes.
Explanation
Correct Answer
D:Relevant validation before approval: Demonstrate the test fails against the original bug, passes after the patch and protects the neighboring valid case using isolated fixtures.
Incorrect Answers
A:Version-control history supports reproducible diffs, accountability and safe undo; reverting a commit adds an inverse change without deleting later shared commits. Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes.
B:Git commits capture repository snapshots, branches isolate lines of work, and merge conflict resolution reconciles competing edits rather than silently choosing an arbitrary version. Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes.
C:Refactoring improves code structure while preserving externally observable behavior; regression tests detect accidental functional changes during internal redesign. Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes.
Question 23
The network automation team has not yet approved changes. Current evidence indicates: A developer changes a configuration push routine and only discovers that it accepts invalid IP prefixes after running against production switches. Which evidence best tests the technical diagnosis before approving a disruptive change? Select ONE best answer.
- Trace call sites, isolate the token helper in a unit test and exercise two independent device objects in a parallel discovery fixture.
- Trace whether a data update is owned by the model and whether subscribers receive one event without creating circular or duplicate updates.
- Demonstrate the test fails against the original bug, passes after the patch and protects the neighboring valid case using isolated fixtures.
- Compare change frequency, owner feedback, explicit acceptance tests, regulatory approval obligations and actual deployment history for the project.
Explanation
Correct Answer
C:Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes. Confirm afterward that: The pipeline proves both valid and invalid requests behave as expected and a regression cannot silently reintroduce the defect.
Incorrect Answers
A:Trace call sites, isolate the token helper in a unit test and exercise two independent device objects in a parallel discovery fixture. Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes.
B:Trace whether a data update is owned by the model and whether subscribers receive one event without creating circular or duplicate updates. Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes.
D:Compare change frequency, owner feedback, explicit acceptance tests, regulatory approval obligations and actual deployment history for the project. Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes.
Question 24
A candidate correction has been tested and the platform team requires a post-change acceptance check. Original problem: A developer changes a configuration push routine and only discovers that it accepts invalid IP prefixes after running against production switches. The service owner needs positive and negative results and evidence that legitimate data workflows still function. Which acceptance result demonstrates correct network automation behavior without disrupting authorized workflows? Select ONE best answer.
- The UI can change independently of inventory rules and interested consumers receive updates without tight point-to-point polling dependencies.
- Device IDs and properties are extracted consistently and missing fields follow deliberate error handling rather than type errors.
- The bad change is reversed with an auditable commit and unrelated approved changes remain present.
- The pipeline proves both valid and invalid requests behave as expected and a regression cannot silently reintroduce the defect.
Explanation
Correct Answer
D:Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes. The result must be validated using the documented device, service or access context.
Incorrect Answers
A:The UI can change independently of inventory rules and interested consumers receive updates without tight point-to-point polling dependencies. Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes.
B:Device IDs and properties are extracted consistently and missing fields follow deliberate error handling rather than type errors. Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes.
C:The bad change is reversed with an auditable commit and unrelated approved changes remain present. Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes.
Question 25
An implementation sign-off request identifies the following problem: A developer changes a configuration push routine and only discovers that it accepts invalid IP prefixes after running against production switches. Which paired technical change and validation should close the implementation review? Select ONE best answer.
- Change: Write a failing focused test for the required behavior and edge case, implement the minimum fix and rerun the automated regression suite before deployment. Verify: Demonstrate the test fails against the original bug, passes after the patch and protects the neighboring valid case using isolated fixtures.
- Change: Create a short-lived branch, commit scoped changes, review a diff and merge after test results while preserving a recoverable mainline history. Verify: Examine git status, branch, log and diff before merging and verify the test suite on the reconciled final tree.
- Change: Trace the offending change through Git history and use a reviewed revert or targeted corrective commit rather than rewriting shared history. Verify: Locate the relevant commit and diff, validate impact on dependent files and execute a test deployment of the proposed revert in staging.
- Change: Encapsulate reusable API operations as functions and modules, and model stateful device clients with narrowly scoped class instances where appropriate. Verify: Trace call sites, isolate the token helper in a unit test and exercise two independent device objects in a parallel discovery fixture.
Explanation
Correct Answer
A:Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes. The change is successful only when: The pipeline proves both valid and invalid requests behave as expected and a regression cannot silently reintroduce the defect.
Incorrect Answers
B:Change: Create a short-lived branch, commit scoped changes, review a diff and merge after test results while preserving a recoverable mainline history. Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes.
C:Change: Trace the offending change through Git history and use a reviewed revert or targeted corrective commit rather than rewriting shared history. Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes.
D:Change: Encapsulate reusable API operations as functions and modules, and model stateful device clients with narrowly scoped class instances where appropriate. Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes.
Question 26
A network automation engineer is examining this network automation situation: An API client retry handler is implemented without tests and repeats non-idempotent POST requests after a timeout, creating duplicate objects. A proposed shortcut is: Treat a successful production API call as a substitute for repeatable pre-deployment unit tests. What should the network automation engineer recommend as the narrowly scoped correction? Select ONE best answer.
- Capture the expected paging and retry behavior in tests, refactor without changing the observable contract and rerun the suite before merging.
- Treat a successful production API call as a substitute for repeatable pre-deployment unit tests.
- Catch anticipated exceptions at a clear boundary, record contextual error details and continue or fail safely according to the operation's consistency requirements.
- Write a failing focused test for the required behavior and edge case, implement the minimum fix and rerun the automated regression suite before deployment.
Explanation
Correct Answer
D:Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes.
Incorrect Answers
A:Capture the expected paging and retry behavior in tests, refactor without changing the observable contract and rerun the suite before merging. Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes.
B:Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes. Use this instead: Write a failing focused test for the required behavior and edge case, implement the minimum fix and rerun the automated regression suite before deployment.
C:Catch anticipated exceptions at a clear boundary, record contextual error details and continue or fail safely according to the operation's consistency requirements. Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes.
Question 27
A Cisco network automation implementation review finds: An API client retry handler is implemented without tests and repeats non-idempotent POST requests after a timeout, creating duplicate objects. The team proposes: Write a failing focused test for the required behavior and edge case, implement the minimum fix and rerun the automated regression suite before deployment. Which engineering principle most strongly supports the recommended response? Select ONE best answer.
- Git commits capture repository snapshots, branches isolate lines of work, and merge conflict resolution reconciles competing edits rather than silently choosing an arbitrary version.
- Parsing a document proves syntactic readability, not semantic compliance with an API schema or preservation of data types and required fields.
- Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes.
- Refactoring improves code structure while preserving externally observable behavior; regression tests detect accidental functional changes during internal redesign.
Explanation
Correct Answer
C:Relevant validation before approval: Demonstrate the test fails against the original bug, passes after the patch and protects the neighboring valid case using isolated fixtures.
Incorrect Answers
A:Git commits capture repository snapshots, branches isolate lines of work, and merge conflict resolution reconciles competing edits rather than silently choosing an arbitrary version. An API client retry handler is implemented without tests and repeats non-idempotent POST requests after a timeout, creating duplicate objects.
B:Parsing a document proves syntactic readability, not semantic compliance with an API schema or preservation of data types and required fields. Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes.
D:Refactoring improves code structure while preserving externally observable behavior; regression tests detect accidental functional changes during internal redesign. Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes.
Question 28
The network automation team has not yet approved changes. Current evidence indicates: An API client retry handler is implemented without tests and repeats non-idempotent POST requests after a timeout, creating duplicate objects. Which evidence best tests the technical diagnosis before approving a disruptive change? Select ONE best answer.
- Examine git status, branch, log and diff before merging and verify the test suite on the reconciled final tree.
- Compare output device counts, pagination continuation tokens and retry timelines before and after the refactor with controlled fixtures.
- Parse a representative record with a format-aware parser and compare nested field types, names and round-trip serialization against the destination schema.
- Demonstrate the test fails against the original bug, passes after the patch and protects the neighboring valid case using isolated fixtures.
Explanation
Correct Answer
D:Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes. This check tests the actual network, API or deployment boundary before an operationally risky change.
Incorrect Answers
A:Examine git status, branch, log and diff before merging and verify the test suite on the reconciled final tree. Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes.
B:Compare output device counts, pagination continuation tokens and retry timelines before and after the refactor with controlled fixtures. Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes.
C:Parse a representative record with a format-aware parser and compare nested field types, names and round-trip serialization against the destination schema. Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes.
Question 29
A candidate correction has been tested and the platform team requires a post-change acceptance check. Original problem: An API client retry handler is implemented without tests and repeats non-idempotent POST requests after a timeout, creating duplicate objects. The service owner needs positive and negative results and evidence that legitimate data workflows still function. Which acceptance result demonstrates correct network automation behavior without disrupting authorized workflows? Select ONE best answer.
- Recoverable device errors are reported without suppressing systemic credential failures or leaving ambiguous partial changes.
- The pipeline proves both valid and invalid requests behave as expected and a regression cannot silently reintroduce the defect.
- Stakeholders can correct requirements early while the required documented approvals and acceptance checks remain enforceable.
- The configured consumer accepts its declared media type and receives the correct nested addresses, identifiers and values.
Explanation
Correct Answer
B:Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes. The approved implementation step was: Write a failing focused test for the required behavior and edge case, implement the minimum fix and rerun the automated regression suite before deployment.
Incorrect Answers
A:Recoverable device errors are reported without suppressing systemic credential failures or leaving ambiguous partial changes. Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes.
C:Stakeholders can correct requirements early while the required documented approvals and acceptance checks remain enforceable. Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes.
D:The configured consumer accepts its declared media type and receives the correct nested addresses, identifiers and values. Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes.
Question 30
For an original CCNA Automation educational scenario, consider: An API client retry handler is implemented without tests and repeats non-idempotent POST requests after a timeout, creating duplicate objects. Select TWO complementary steps: the targeted correction and its strongest prechange validation.
- Check: Trace whether a data update is owned by the model and whether subscribers receive one event without creating circular or duplicate updates.
- Check: Demonstrate the test fails against the original bug, passes after the patch and protects the neighboring valid case using isolated fixtures.
- Change: Write a failing focused test for the required behavior and edge case, implement the minimum fix and rerun the automated regression suite before deployment.
- Change: Create a short-lived branch, commit scoped changes, review a diff and merge after test results while preserving a recoverable mainline history.
- Treat a successful production API call as a substitute for repeatable pre-deployment unit tests.
Explanation
Correct Answer
B:Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes. Acceptance: The pipeline proves both valid and invalid requests behave as expected and a regression cannot silently reintroduce the defect.
C:Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes. Evidence: Demonstrate the test fails against the original bug, passes after the patch and protects the neighboring valid case using isolated fixtures.
Incorrect Answers
A:Check: Trace whether a data update is owned by the model and whether subscribers receive one event without creating circular or duplicate updates. Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes.
D:Change: Create a short-lived branch, commit scoped changes, review a diff and merge after test results while preserving a recoverable mainline history. An API client retry handler is implemented without tests and repeats non-idempotent POST requests after a timeout, creating duplicate objects.
E:Test-driven development emphasizes a red-green-refactor cycle with expected outcomes expressed as executable tests before implementation changes.