Extending your CI test repertoire in Visual C#.NET

Generate QR-Code in Visual C#.NET Extending your CI test repertoire

Extending your CI test repertoire
QR Code 2d Barcode Encoder In Visual C#
Using Barcode generation for Visual Studio .NET Control to generate, create QR Code image in .NET framework applications.
www.OnBarcode.com
Read QR Code JIS X 0510 In C#
Using Barcode decoder for .NET Control to read, scan read, scan image in .NET framework applications.
www.OnBarcode.com
In this chapter, we ll focus on tests that can be automated. Without automation, test activities wouldn t play a valuable role in CI because they d have to be done manually. Manual tests are important as another means to improve software quality, but they tend to be difficult to perform continuously. It s hard to imagine test personnel performing tests after every check-in to the repository, don t you think The developer isn t the only person who can write tests. In many scenarios, domain experts create their own tests. Of course, they need a different set of tools to write tests than developers use. We ll deal with one of these tools, FitNesse, in this chapter. When you know what you re testing, and your tests are based on the actual code, you re doing white-box testing. If the inner workings of a piece of software you re testing are unknown to you, that s black-box testing. Unit testing is most definitely a white-box test methodology. Regardless of whether you do test-driven development (TDD), you know the implementation details of what you re testing. We ll focus in this chapter on black-box testing. Usually, black-box tests are functional tests they don t care how the software works as long it meets the requirements.
2D Barcode Printer In Visual C#
Using Barcode maker for .NET Control to generate, create Matrix 2D Barcode image in VS .NET applications.
www.OnBarcode.com
Generating UPC - 13 In Visual C#
Using Barcode generator for VS .NET Control to generate, create GTIN - 13 image in .NET applications.
www.OnBarcode.com
Extending your CI test repertoire
Printing ECC200 In Visual C#
Using Barcode generator for .NET Control to generate, create Data Matrix 2d barcode image in VS .NET applications.
www.OnBarcode.com
QR Code 2d Barcode Printer In C#.NET
Using Barcode encoder for .NET Control to generate, create QR-Code image in Visual Studio .NET applications.
www.OnBarcode.com
Figure 7.1 The testing timeline. First, you do the unit tests. Then, you take a bigger piece of software and test how it integrates with other pieces. After that, you test how the software behaves in the production environment with a system test.
Encoding Barcode In C#.NET
Using Barcode creator for .NET framework Control to generate, create Barcode image in VS .NET applications.
www.OnBarcode.com
Print International Standard Book Number In Visual C#.NET
Using Barcode creation for Visual Studio .NET Control to generate, create ISBN - 10 image in .NET applications.
www.OnBarcode.com
The test process that begins with unit testing usually continues with integration tests (see figure 7.1). Integration tests usually involve testing the interoperability between a few modules. The modules are usually thoroughly covered with unit tests, and integration testing lays the groundwork for the next step: system testing. System tests are roughly equivalent to the functional tests we mentioned earlier. They occur in fully integrated software, preferably in the deployment environment, and ensure that the software works as designed and meets all the requirements. From the system and functional tests emerges yet another interesting aspect of software testing in the CI environment: acceptance testing. This type of test can be designed and performed by an end user or a domain expert. Usually, a system test doesn t require programming skills. In this chapter, we ll investigate acceptance tests that you can automate. Various testing frameworks let you automate integration and system tests. We ll look at three of them in depth throughout this chapter:
QR-Code Printer In Java
Using Barcode creation for Android Control to generate, create QR-Code image in Android applications.
www.OnBarcode.com
QR Reader In None
Using Barcode recognizer for Software Control to read, scan read, scan image in Software applications.
www.OnBarcode.com
White Tests a WinForms or Silverlight application Selenium Tests an ASP.NET application FitNesse Performs acceptance tests
Painting Code 39 Extended In Java
Using Barcode creator for BIRT reports Control to generate, create ANSI/AIM Code 39 image in BIRT applications.
www.OnBarcode.com
Making Data Matrix In VB.NET
Using Barcode encoder for .NET framework Control to generate, create Data Matrix 2d barcode image in .NET applications.
www.OnBarcode.com
As you can see, there s a lot more to testing than just unit tests. Let s look at these additional tests from the CI angle.
Create Data Matrix 2d Barcode In .NET Framework
Using Barcode printer for .NET Control to generate, create DataMatrix image in Visual Studio .NET applications.
www.OnBarcode.com
Barcode Generation In VS .NET
Using Barcode drawer for Reporting Service Control to generate, create Barcode image in Reporting Service applications.
www.OnBarcode.com
Beyond unit tests in CI
Printing Code 128 Code Set A In .NET Framework
Using Barcode creator for .NET Control to generate, create Code 128 Code Set A image in .NET framework applications.
www.OnBarcode.com
Making PDF 417 In .NET Framework
Using Barcode maker for Reporting Service Control to generate, create PDF 417 image in Reporting Service applications.
www.OnBarcode.com
Unit tests are merely the first step in the long testing journey. Think of this journey as a road trip: each state border you cross requires a different type of test. You start at the state of unit tests, and as you continue on the trip, you find a series of more complex testing scenarios.
QR Code ISO/IEC18004 Generation In None
Using Barcode drawer for Excel Control to generate, create Denso QR Bar Code image in Office Excel applications.
www.OnBarcode.com
Code 39 Full ASCII Creator In Objective-C
Using Barcode generator for iPhone Control to generate, create Code 39 Extended image in iPhone applications.
www.OnBarcode.com
Integration tests System, functional, and acceptance tests Performance, load, and stability tests
ECC200 Maker In Java
Using Barcode generator for Eclipse BIRT Control to generate, create Data Matrix 2d barcode image in BIRT reports applications.
www.OnBarcode.com
ANSI/AIM Code 39 Creation In None
Using Barcode maker for Office Word Control to generate, create Code 39 Extended image in Office Word applications.
www.OnBarcode.com
As you enter the state of each test, you look for road signs to help you understand what each test is and why you re interested in it. Let s see what these signs have to say.
Perform ing integration, system , and acceptance testing
INTEGRATION TESTS Integration tests usually take multiple pieces of functionality and test how they behave together. Such tests can involve two or more classes, assemblies, components, or even small programs that interoperate. It s a good idea to leave as much isolation as possible while you re integration testing. What does this mean When you unit test your software, the goal is to mock every external activity the code is performing. There s no database connection present, no reading or writing to files, no network connectivity not even the configuration matters. Integration tests are allowed to interact with the system, but they should stay as small as possible. The tests should be fast and give you immediate feedback if there s a problem. Integration tests are perfect to use in a CI environment. FUNCTIONAL TESTS Functional tests, on the other hand, are sometimes associated with integration tests and sometimes with system tests. You extract functional tests from other types of tests to support your CI scenario. Let s say your functional tests extend your integration tests. Code tested in this manner has no interfaces stubbed. You don t use mocking to isolate your functionality. There s one important thing to remember if you want to integrate functional tests in your CI process: the CI tests should be fast. If you rely on a database connection or other external resources, the tests tend to take longer. If you re able to fit the tests into a 10-minute run, you re good to go. If the functional tests take longer, you should think about dividing your build process into smaller chunks. ACCEPTANCE TESTS Acceptance tests take fully integrated software with all its dependencies and test it against a normal environment. This means no mocking only the real deal. You should test I/O, network, and database operations with specific configurations. Acceptance tests can be designed by the customer or domain specialist. This kind of test usually takes longer to run. These tests won t break your build, so they re usually not included in the CI build, but they re great material for periodic builds, such as the nightly or weekly build. SYSTEM TESTS System tests are also performed on fully integrated software, but the environment tends to mimic a production environment more than it does during acceptance tests. This kind of test is hard to integrate within your build process; these tests tend to rely on specific hardware and software configurations. But if you strain a little, some system tests can be included in your automatic build and test schedule. Software that passes system tests can be tested in various other ways. For example, you can test how it performs under high load. During this kind of test, you try to stress your software in various ways. For instance, you may issue thousands of requests to a website or take your software through the mill with your database.
Copyright © OnBarcode.com . All rights reserved.