xunit test patterns refactoring test code phần 9 potx
... situation, we use a Test Hook because we have no other way to address the Untested Code (see Production Bugs on page 268) caused by a Hard-Coded Dependency (see Hard-to -Test Code on page 2 09) . DOC SUT Usage Exercise If Testing? No Production Logic Test- Specific Logic Setup Exercise Verify Teardown If Testing? Yes No Production Logic Test- Specific Logic Yes DOC SUT Usage Exerc...
Ngày tải lên: 14/08/2014, 01:20
... SUT depends with a test- specifi c equivalent.” Test Enumeration ( 399 ): The test automater manually writes the code that enumerates all tests that belong to the test suite. Test Helper (643): ... hold any Test Utility Methods we want to reuse in several tests. Test Hook (7 09) : We modify the SUT to behave differently during the test. Test Method (348): We encode each test...
Ngày tải lên: 14/08/2014, 01:20
... including Infrequently Run Tests or Untested Code. The latter problem may result from Missing Unit Tests or Lost Tests. By specifying that “enough tests” be run, we mean the test coverage should be ... published on test smells and refactoring test code. The four sen- sitivities were fi rst described in [ARTRP], which also described several ways to avoid Fragile Tests in Recorded T...
Ngày tải lên: 14/08/2014, 01:20
xunit test patterns refactoring test code phần 5 doc
... n LayernTestcaseClass testMethod_1 testMethod_2 Layer1TestcaseClass testMethod_1 testMethod_2 Layer 1 Test Double Test Double DOC Layer n LayernTestcaseClass testMethod_1 testMethod_2 Layer1TestcaseClass testMethod_1 testMethod_2 Layer ... these Test Methods into Testcase Objects (page 382) at runtime using either Test Discovery (page 393 ) or Test Enumeration (page 399 ). We foll...
Ngày tải lên: 14/08/2014, 01:20
xunit test patterns refactoring test code phần 6 ppsx
... garbage-collected } Refactoring Notes These tests contain a fair amount of Test Code Duplication. We can remove this duplication by refactoring this Testcase Class to use Implicit Setup. There are two refactoring ... extends TestSetup { private FlightManagementTestHelper helper = new FlightManagementTestHelper(); public ParameterizedFlightManagementTestSetup( Test testSuit...
Ngày tải lên: 14/08/2014, 01:20
xunit test patterns refactoring test code phần 7 potx
... Double Test Double Mock Object Test Spy Dummy Object Test Stub Fake Object Hard-Coded Test Double Configurable Test Double Test Double Mock Object Test Spy Dummy Object Test Stub Fake Object Hard-Coded Test Double Test Double Test Double Simpo ... separate Test Double Class (see Hard-Coded Test Double). Each of these options is discussed in more detail in Hard-Co...
Ngày tải lên: 14/08/2014, 01:20
xunit test patterns refactoring test code phần 8 docx
... Variation: Test Utility Test One major advantage of using Test Utility Methods is that otherwise Untestable Test Code (see Hard-to -Test Code on page 2 09) can now be tested with Self- Checking Tests. ... Utility Method_1 Test Utility Method_2 Testcase Class testMethod_1 testMethod_n Fixture SUT Test Helper Test Utility Method_1 Test Utility Method_2 Test Helper Tes...
Ngày tải lên: 14/08/2014, 01:20
xunit test patterns refactoring test code phần 10 docx
... 288–2 89 principles, 48 reducing Test Code Duplication, 118–1 19 refactoring notes, 294 Test Suite Object Simulator, 293 using Fit framework, 290 – 292 via Naive xUnit Test Interpreter, 292 – 293 via Test Suite Object ... 27– 29 code smells Conditional Test Logic. See Conditional Test Logic defi ned, 10–11, 7 89 Hard-To -Test Code. See Hard-To -Test Code ob...
Ngày tải lên: 14/08/2014, 01:20