DevNet Associate (DEVASC)

Here you have the best Cisco 200-901 practice exam questions

  • You have 530 total questions to study from
  • Each page has 5 questions, making a total of 106 pages
  • You can navigate through the pages using the buttons at the bottom
  • This questions were last updated on November 15, 2024
Question 1 of 530

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

    Correct Answer: B, E

    Test-driven development (TDD) is a software development methodology that involves writing a test before writing the actual code. This ensures that the code is tested incrementally and helps in refining and improving it through continuous refactoring. By following these steps, TDD facilitates the creation of clean, efficient, and bug-free code. Therefore, enabling code refactoring and writing a test before writing code are two key concepts that describe TDD.

Question 2 of 530

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

    Correct Answer: C

    In test-driven development (TDD), the process involves writing tests before writing the actual code. Once the test is written and fails (because the functionality is not yet implemented), the developer writes the minimum amount of code required for the test to pass. After the test passes, the code is then refactored to ensure it is clean and efficient while still passing the tests. The task of refactoring code that is covered by existing tests aligns with the principles of TDD, as it involves refining the code after it has already been tested to ensure it meets all requirements and maintains readability and structure without changing its behavior.

Question 3 of 530

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

    Correct Answer: B

    In test-driven development (TDD), the first development task is to write a failing test case for the desired function. This initial test case is intended to define the function's expected behavior before any actual implementation code is written, ensuring that the code development follows the requirements specified by the test. Only after writing this failing test and seeing it fail does the developer proceed to write the minimum amount of code necessary to make the test pass.

Question 4 of 530

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

    Correct Answer: C, E

    In test-driven development (TDD), two recognized green bar patterns are 'triangulate' and 'fake it'. 'Triangulate' refers to the method of using multiple tests to drive the design of the code, while 'fake it' is about implementing simple code that makes the test pass in the simplest way possible. These patterns help ensure that the code evolves incrementally and maintains a clear focus on passing tests while gradually improving the implementation.

Question 5 of 530

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

    Correct Answer: C

    In the test-driven development model, after a test fails, the code is changed. This is because the primary purpose of test-driven development is to write the minimum amount of code necessary to pass the failing test. The process involves writing a test that initially fails, then writing the code to make the test pass, followed by refactoring the code if necessary. Therefore, the correct answer is that the code is changed.