Free Cisco 200-901 DEVASC practice questions

10 free Cisco 200-901 DEVASC practice questions with the correct answer and a full explanation for each, taken from the CertStash pack of 631 questions. Work through them, then open each answer to check your reasoning.

Question 1

Which two concepts describe test-driven development? (Choose two.)

  1. User acceptance testers develop the test requirements.
  2. It enables code refactoring.
  3. Tests are created when code is ready for release.
  4. Implementation is driven by incremental testing of release candidates.
  5. Write a test before writing code.
Show answer and explanation

Correct answer: B, E

B. It enables code refactoring. E. Write a test before writing code. Test-driven development is defined by writing tests before writing implementation code (option E), and this practice enables safe code refactoring because tests verify that changes don't break existing functionality (option B). User acceptance testers do not develop test requirements in TDD, developers do. Tests are not created when code is ready for release; they are created first. Implementation is driven by incremental testing, but not specifically of release candidates.

Why the other options are wrong

  • A. User acceptance testers develop acceptance tests, not the unit tests that drive TDD.
  • C. Tests are created at the beginning of the development cycle in TDD, not when code is ready for release.
  • D. While TDD involves incremental testing, it specifically tests code as it is written, not release candidates.

Question 2

Which task is performed because the test-driven development approach is being used?

  1. creating test scenarios based on continuous development
  2. writing code without committing any coding violations
  3. refactoring code that is covered by existing tests
  4. testing existing software before developing new code
Show answer and explanation

Correct answer: C. refactoring code that is covered by existing tests

Refactoring code that is covered by existing tests is a core task enabled by test-driven development. Because comprehensive tests have already been written before and during implementation, developers can confidently refactor code knowing that tests will catch any introduced regressions. Creating test scenarios is independent of TDD methodology. Writing code without violations and testing existing software before new development are practices that may or may not be part of TDD.

Why the other options are wrong

  • A. Creating test scenarios based on continuous development is not a task that exists because TDD is used; it's a general testing activity.
  • B. Writing code without violations is a coding standard, not a specific task resulting from using TDD.
  • D. Testing existing software before developing new code describes regression testing, not a task driven by TDD methodology.

Question 3

What is the first development task in test-driven development?

  1. Write code that implements a desired function.
  2. Write a failing test case for a desired function.
  3. Reverse engineer the code for a desired function.
  4. Write a passing test case for existing code.
Show answer and explanation

Correct answer: B. Write a failing test case for a desired function.

Test-driven development begins with writing a failing test case for the desired function before any implementation code is written. This test defines the expected behavior and fails because the functionality does not yet exist. Once the test is written, developers then write the minimum code necessary to make the test pass, followed by refactoring. Writing code first, reverse engineering, or testing existing code are not the starting point of TDD.

Why the other options are wrong

  • A. Writing code that implements the function comes after writing the test, not before.
  • C. Reverse engineering is not part of the TDD process.
  • D. A passing test case cannot exist at the start because the code being tested has not been written yet.

Question 4

In test-driven development, what are two of the green bar patterns? (Choose two.)

  1. another test
  2. break
  3. triangulate
  4. starter test
  5. fake it
Show answer and explanation

Correct answer: C, E

C. triangulate E. fake it Green bar patterns in Kent Beck's test-driven development describe techniques for getting a failing test to pass quickly. Triangulate drives out the general solution by adding a second example and generalizing the code to satisfy both. Fake it returns a hardcoded value to turn the bar green immediately, then refactors toward the real implementation. The other options belong to Beck's red bar patterns, which govern when and how to write the next test.

Why the other options are wrong

  • A. Another test is a red bar pattern used to park a new idea by writing an additional test, not a way to make a failing test pass.
  • B. Break is a red bar pattern about taking a rest when you are stuck, so it does not help turn the bar green.
  • D. Starter test is a red bar pattern that defines the first test to write for a new piece of functionality.

Question 5

In the test-driven development model, what is changed after a test fails?

  1. schedule
  2. project requirements
  3. code
  4. test
Show answer and explanation

Correct answer: C. code

When a test fails in test-driven development, the code is changed to make the test pass. This is the core cycle of TDD: write a failing test, then modify the implementation code until the test passes. The schedule is not changed in response to test failures. Project requirements should have been established before writing tests. The test itself should not be changed merely because it fails; a failing test is the expected starting point.

Why the other options are wrong

  • A. The development schedule is not adjusted when a test fails during the TDD cycle.
  • B. Project requirements should drive test creation, not change because tests fail.
  • D. Tests should not be changed to pass; instead, code is written to pass the test.

Question 6

What is a benefit of test-driven development?

  1. strict adherence to product requirements
  2. faster releases that have minimal features
  3. early customer involvement
  4. increased code quality
Show answer and explanation

Correct answer: D. increased code quality

Increased code quality is a primary benefit of test-driven development. Because tests are written first and code is continuously verified against those tests, defects are caught early and the codebase remains clean and maintainable. While TDD may support adherence to requirements, faster releases with minimal features are contrary to TDD benefits, and customer involvement is not specifically a benefit of TDD itself.

Why the other options are wrong

  • A. While TDD supports requirements, strict adherence is not its defining benefit.
  • B. TDD does not result in faster releases with minimal features; it prioritizes quality over speed.
  • C. Early customer involvement is not a direct benefit of TDD; it is a practice in other methodologies like Agile.

Question 7

Which two statements describe the advantages of using a version control system? (Choose two.)

  1. It allows for branching and merging so that different tasks are worked on in isolation before they are merged into a feature or master branch.
  2. It provides tooling to automate application builds and infrastructure provisioning.
  3. It allows multiple engineers to work against the same code and configuration files and manage differences and conflicts.
  4. It provides a system to track User Stories and allocate to backlogs.
  5. It allows developers to write effective unit tests.
Show answer and explanation

Correct answer: A, C

A. It allows for branching and merging so that different tasks are worked on in isolation before they are merged into a feature or master branch. C. It allows multiple engineers to work against the same code and configuration files and manage differences and conflicts. Version control systems enable branching and merging so that developers can work on different tasks in isolation before integrating changes (option A), and they allow multiple team members to work on the same codebase while managing conflicts and differences (option C). Build automation and infrastructure provisioning are provided by CI/CD tools, not version control systems. User story tracking is handled by project management systems. Writing unit tests is a development practice independent of version control.

Why the other options are wrong

  • B. Build automation and infrastructure provisioning are provided by CI/CD tools, not version control systems.
  • D. User story tracking and backlog management are handled by project management systems, not version control.
  • E. The ability to write unit tests is a development skill and practice, not an advantage of version control software.

Question 8

What are two advantages of version control software? (Choose two.)

  1. It supports tracking and comparison of changes in binary format files.
  2. It allows new team members to access the current code and history.
  3. It supports comparisons between revisions of source code files.
  4. It provides wiki collaboration software for documentation.
  5. It allows old versions of packaged applications to be hosted on the Internet.
Show answer and explanation

Correct answer: B, C

B. It allows new team members to access the current code and history. C. It supports comparisons between revisions of source code files. Version control software allows new team members to access current code and the complete history of changes (option B), and it supports detailed comparisons between different revisions of source code files to understand what changed and why (option C). Version control typically works best with text-based files and has limitations with binary formats. Wiki collaboration and hosting packaged applications are not core functions of version control systems.

Why the other options are wrong

  • A. Version control systems work primarily with text-based files and have limited support for binary format files.
  • D. Wiki collaboration software is a separate tool category, not a feature of version control systems.
  • E. Hosting old versions of packaged applications is not a function of version control systems.

Question 9

Before which process is code review performed when version control is used?

  1. checkout of code
  2. merge of code
  3. committing code
  4. branching code
Show answer and explanation

Correct answer: B. merge of code

Code review acts as the quality gate immediately before a merge. A developer works on a branch, commits and pushes the changes, then opens a pull or merge request so reviewers can inspect the diff. Only after the review approves the changes are they merged into the main line, which keeps defective code out of the shared codebase.

Why the other options are wrong

  • A. Checkout simply retrieves a branch or revision into the working directory, long before any changes exist to review.
  • C. Commits are what create the changes under review, so committing happens first and the review follows.
  • D. Branching only creates a separate line of development and produces no changes to inspect.

Question 10

What is an advantage of a version control system?

  1. facilitates resolving conflicts when merging code
  2. ensures that unit tests are written
  3. prevents over-writing code or configuration files
  4. forces the practice of trunk-based development
Show answer and explanation

Correct answer: A. facilitates resolving conflicts when merging code

Version control systems provide tools and history tracking that facilitate resolving conflicts when merging code from different branches or developers. When two changes affect the same lines, the VCS highlights these conflicts and allows developers to manually resolve them with full visibility of what both sides changed. This is a core advantage of using version control for collaborative development.

Why the other options are wrong

  • B. Version control does not enforce or ensure that unit tests are written; that is a development practice or CI/CD pipeline responsibility.
  • C. While version control does track changes and can prevent accidental overwrites through conflict detection, preventing overwrites is not its primary advantage, managing change history and collaboration is.
  • D. Version control systems support many workflows including trunk-based, feature branching, and others; they do not force any particular development practice.

That was 10 of 631.

The full Cisco 200-901 DEVASC pack has all 631 questions, each with the answer, the explanation and why the other options are wrong, plus a questions-only copy for timed runs. US$39, paid once, with free monthly updates and a pass-or-your-money-back guarantee.

Get the full pack