Exforsys

VB.NET 2005

  1. VB.NET 2005 Free Training
  2. The .NET Framework Architecture Part 1
  3. The .NET Framework Architecture Part 2
  4. Application Class and Message Class
  5. Implementing Class Library Object
  6. Visual Studio.NET Namespaces
  7. .NET Assemblies
  8. Differences between VB.NET 1.0 and VB.NET 2.0
  9. Introducing VB.NET Windows Forms
  10. Visual Studio Windows Forms Designer
  11. Exploring the Forms Designer generated code
  12. Setting and Adding Properties to Windows Form
  13. Implementing Inheritance
  14. Event Handling In Visual Basic .NET
  15. Building Graphical Interface elements
  16. .NET Common Windows Forms Controls Part 1
  17. .NET Common Windows Forms Controls Part 2
  18. Common Controls and Handling Control Events
  19. DomainUpDown and NumericUpDown Controls
  20. Dialog Boxes in Visual Basic .NET
  21. Visual Studio Adding Controls to Windows Form
  22. VB.NET Validation Controls
  23. Working with Menu Controls
  24. VB.NET MDI Applications
  25. .NET Exceptions
  26. VB.NET Creating and Managing Components Part 1
  27. VB.NET Creating and Managing Components Part 2
  28. Simple Data Binding
  29. .NET Complex Data Binding
  30. .NET Data Form Wizard
  31. Data Manipulation with ADO.NET
  32. SQL Server Stored Procedures
  33. SQL Server Ad Hoc Queries
  34. Finding and Sorting Data in DataSets
  35. ADO.NET Object Model
  36. Working with DataSets
  37. Using XML Data
  38. Working with File System in .NET
  39. Creating Web Service
  40. Instantiating - Invoking Web Services, Creating Proxy Classes with WSDL
  41. Web Reference and Web Services
  42. Web Services - SOAP, WSDL, Disco and UDDI
  43. Web Application Testing in VB.NET 2005
  44. Web Application Tracing and Debugging
  45. Working with Legacy Code and COM Components
  46. ActiveX Controls and Legacy Code
  47. Windows Application Testing
  48. VB.NET Windows Application Testing
  49. Tracing VB.NET Windows Application
  50. Debugging Windows Applications In Visual Studio.NET 2005
  51. Deploying Windows Applications In Visual Studio.NET 2005
  52. Customizing Setup Project in Visual Studio.NET 2005
  53. Shared Assembly
  54. Microsoft .NET Creating Installation Components
  55. The Registry Editor in Visual Studio.NET 2005
  56. The File Types Editor

Ads


Home arrow Technical Training arrow VB.NET 2005

Web Application Testing in VB.NET 2005

Page 1 of 2
Author : Exforsys Inc.     Published on: 28th Jul 2005    |   Last Updated on: 30th Apr 2006

VB.NET 2005 Turorials : Testing a Web Application

In this tutorial you will learn about Testing a Web Application, Configuring ASP.NET Unit Tests Using Run Configuration, Creating and Removing Run Configurations, Subsequent run configurations, removing run configuration and editing run configuration.

Ads

An application is software is created to function efficiently given the necessary parameters. Developers are conscious that, even in the most efficiently created software, errors of a certain nature can occur and must be provided for at design time. Yet other errors could occur at runtime and therefore applications need to be tested and debugged at runtime too. Therefore testing and debugging applications are an important part of application development. Visual Studio.NET provides the developer with several tools that he can use for testing and debugging the applications within the Integrated development environment (IDE).

The number of ways in which the application can be tested and debugged in Visual studio.NET demands that the user create a test plan beforehand. The developer can add a test project. He can test for performance, international settings or an existing test can be opened. To this end he must chalk out:

1. What kind of tests are to be created?

2. What is the type of load test that will be required?

3. Will the developer be required to execute a manual test?

4. How will the tests be managed?

5. What will be measured in the test--functionality, validation, performance or others?

Once the test plan has been created unit tests can be executed.

Let us presume that we have a project that has both public methods and private methods. The project has to be opened and we have to create unit tests for public and private methods. The next task is to run the tests on the projects code; find and correct the errors.

ASP .NET test projects can be created in any of the two ways mentioned below:

(1) By generating the ASP.NET unit test.

(2) By configuring an existing unit test as an ASP.NET unit test.

Generating an ASP.NET Unit Test

1. Create an ASP.NET Web site within the Visual Studio solution.

2. Add a class to the Web site project, and

3. Finally, generate a unit test from that class.

4. We will use the existing Website to provide support for this.

5. Add a class to this project. To do this, in Solution Explorer, right-click the Web site and then click Add New Item.

6. In the Add New Item dialog box, click Class, and then click Add.

7. In the resulting Microsoft Visual Studio dialog box, click Yes.

Now we will generate an ASP.NET unit test.

(1) To do this, first open the new class file by double-clicking it in Solution Explorer.

(2) Right-click within the class in the class file. In the context menu and click on “Create Tests.”

(3) In the Unit Test Generation dialog box, click Generate.

The new ASP.NET unit test is added to a file in your test project.

To see the unit test, open the test file and scroll to the end. The attributes that are necessary to run a unit test as an ASP.NET unit test have been automatically set. The content of the test file is given below:

Click here to view sample code

Configuring ASP.NET Unit Tests Using Run Configuration

Settings in a run configuration can be defined so that they correspond to the attributes used by ASP.NET unit tests. After these attributes are set in a run configuration, the settings will apply when unit test is run. Run configuration settings take precedence over the equivalent custom attributes, if present.

Creating and Removing Run Configurations

First we shall add an initial run configuration to the solution

1. Add a test project to your solution.

2. A run configuration is added automatically to the solution under the Solution Items folder.

3. Each run configuration created is listed as a choice for the Select Active Test Run Configuration and Edit Test Run Configurations options on the Test menu.



 
This tutorial is part of a VB.NET 2005 tutorial series. Read it from the beginning and learn yourself.

VB.NET 2005

  1. VB.NET 2005 Free Training
  2. The .NET Framework Architecture Part 1
  3. The .NET Framework Architecture Part 2
  4. Application Class and Message Class
  5. Implementing Class Library Object
  6. Visual Studio.NET Namespaces
  7. .NET Assemblies
  8. Differences between VB.NET 1.0 and VB.NET 2.0
  9. Introducing VB.NET Windows Forms
  10. Visual Studio Windows Forms Designer
  11. Exploring the Forms Designer generated code
  12. Setting and Adding Properties to Windows Form
  13. Implementing Inheritance
  14. Event Handling In Visual Basic .NET
  15. Building Graphical Interface elements
  16. .NET Common Windows Forms Controls Part 1
  17. .NET Common Windows Forms Controls Part 2
  18. Common Controls and Handling Control Events
  19. DomainUpDown and NumericUpDown Controls
  20. Dialog Boxes in Visual Basic .NET
  21. Visual Studio Adding Controls to Windows Form
  22. VB.NET Validation Controls
  23. Working with Menu Controls
  24. VB.NET MDI Applications
  25. .NET Exceptions
  26. VB.NET Creating and Managing Components Part 1
  27. VB.NET Creating and Managing Components Part 2
  28. Simple Data Binding
  29. .NET Complex Data Binding
  30. .NET Data Form Wizard
  31. Data Manipulation with ADO.NET
  32. SQL Server Stored Procedures
  33. SQL Server Ad Hoc Queries
  34. Finding and Sorting Data in DataSets
  35. ADO.NET Object Model
  36. Working with DataSets
  37. Using XML Data
  38. Working with File System in .NET
  39. Creating Web Service
  40. Instantiating - Invoking Web Services, Creating Proxy Classes with WSDL
  41. Web Reference and Web Services
  42. Web Services - SOAP, WSDL, Disco and UDDI
  43. Web Application Testing in VB.NET 2005
  44. Web Application Tracing and Debugging
  45. Working with Legacy Code and COM Components
  46. ActiveX Controls and Legacy Code
  47. Windows Application Testing
  48. VB.NET Windows Application Testing
  49. Tracing VB.NET Windows Application
  50. Debugging Windows Applications In Visual Studio.NET 2005
  51. Deploying Windows Applications In Visual Studio.NET 2005
  52. Customizing Setup Project in Visual Studio.NET 2005
  53. Shared Assembly
  54. Microsoft .NET Creating Installation Components
  55. The Registry Editor in Visual Studio.NET 2005
  56. The File Types Editor
 

Comments