P Quiz 7

docx

School

New York University *

*We aren’t endorsed by this school

Course

4513

Subject

Computer Science

Date

Feb 20, 2024

Type

docx

Pages

6

Uploaded by ara21059

Report
1. Testing Python code is aided by a package called...? 1. pylib 2. numpy 3. scipy 4. pytest 2. One of Bob Martin's rules of TDD is...? 1. Only write enough production code to make a test pass. 2. Write all of your production code before any tests, since tests are less important 3. Write a complete test suite before you write a line of production code 4. All of the above 3. Acceptance testing tests features as...? 1. the computer sees them 2. the tester sees them 3. the user sees them 4. the regulator sees them 4. White Box tests test...? 1. internal logic of the application 2. functionality of the application 3. whether application satisfies the requirenments 4. none of the above 5. What is regression testing? 1. a very regressive form of testing 2. a way to make tests more primitive each go-round
3. a way to see if the program has regressed after a change 4. none of the above 5. Test 6. Unit tests work primarily at the level of...? 1. individual classes and methods 2. user-level interactions 3. checking the integration of the various modules of the software 4. all of the above 7. To enable zero-length feedback, we must have a culture of...? 1. multiple levels of approval for each change 2. suspicion 3. waterfall model development 4. trust 8. In testing a "fake" is...? 1. a mock of an object 2. an actual object but with fake data 3. someone who pretends they ran the tests but didn't 4. a crude initation of a real object 9. Fixture is...? 1. a set of checks to be performed 2. the initiation of an object returning hard-coded values 3. a test object with fake data 4. a prepared data to be loaded into the database 10. Functional tests work by testing...?
1. only functions within a program 2. the program against various inputs 3. the third party packages used in a program 4. testing the maximum workload of a system 11. The steps in a test are: 1. Arrange - Act - Assert 2. Argue - Assert - Abduct 3. Assign - Abridge - Adjourn 4. Arbitrate - Adjudicate - Abdicate 12. The "setup" portion of a test...? 1. sets up the data our tests will use 2. sets up the logical assertions the test will use 3. sets up the test suite for failure 4. sets up the user for a big surprise 13. In testing, a "stub" is...? 1. a real object that takes up very few bytes 2. a crude imitation of a real object, returning hard-coded values 3. a very short test 4. a test that got cut off early 14. Continuous testing is the...? 1. technique of writing tests before you write your code
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
2. process of executing tests as a part of software delivery pipeline 3. process of calculating coverage of your code 4. testing using nose package 15. The teardown section of a test suite...? 1. tears down code that didn't work 2. tears down the user's confidence 3. tears down the CI/CD tool 4. tears down the setup data so each new test has fresh data 16. `assertIsInstance(a, b)` asserts that...? 1. `a` and `b` are objects of the exact same type 2. the type of `b` is a sub-type of the type `a` 3. the type of `a` is a sub-type of the type `b` 4. none of the above. 17. In testing, a "mock" is...? 1. a simulation of some resource 2. someone who makes fun of the tests 3. the white garment usually worn by lab technicians 4. all of the above 18. Black Box tests test...? 1. compatibility of branches in Git with the master branch 2. internal system design of a program
3. the third party packages used in a program 4. the functionality and requirements of a program 19. When we test how modules work together, that is called...? 1. unit testing 2. acceptance testing 3. integration testing 4. none of the above 20. In pytest, assert statements are a way to...? 1. practice getting what you really want from life 2. push some code into production 3. assert what code should be run 4. state what condition should be true at some point in the code being tested 21. One of Bob Martin's rules of TDD is...? 1. Always code for a day before writing a test 2. Write a test that passes before you write one that fails 3. Before you write any production code, write a failing test for that (planned) code. 4. All of the above 22. The Test Pyramid consists of...? 1. Unit tests 2. Integration tests 3. Acceptance tests 4. all of the above 23. The "zero-bug mindset" means that...?
1. no developers should be bugging out 2. no bug backlog should ever build up 3. no one should ever make a coding mistake 4. we should ridicule anyone who introduces a bug 24. A test suite is...? 1. tests that can be run by the "C-suite" level of management 2. a suite of assert statements 3. a set of tests to test some particular aspect of the software 4. all of the above
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help