Command line support for .Net services and ASP.Net
Today we have released updated versions of our software tools for .Net: .Net Coverage Validator, .Net Memory Validator and .Net Performance Validator.
The updates to each tool add support for monitoring .Net services and ASP.Net processes when working with the tool from the command line. This allows you to, for example, control the tool from batch files and easily create large suites of tests that you can run and control from batch files or using other scripting technologies. This command line support builds on the already existing command line support in each tool for working with .Net desktop applications. For information on existing command line options for each tool please see the help file that ships with each tool.
I’m going to outline the new command line options for each tool and provide some basic examples of how you might use these options with each tool. Each tool has been given the same basic options, with each tool getting some additional options specific to that tool.
.Net Coverage Validator
- -serviceName fileName
The -serviceName option is used to specify which service .Net Coverage Validator should monitor. The filename argument should be quoted if the filename contains spaces.-serviceName c:\path\myservice.exe -serviceName "c:\path with spaces\myservice.exe"
- -urlToVisit url
The -urlToVisit option specifies the web page that should be opened by the web browser when working with ASP.Net web servers.-urlToVisit http://localhost/myTestPage.aspx -urlToVisit "http://localhost/myTestPage.aspx"
- -aspNetName filename
The -aspNetName option is used to specify the ASP.Net process that is used by IIS. The filename argument should be quoted if the filename contains spaces.-aspNetName c:\windows\Microsoft.Net\Framework\v4.0.30319\aspnet_wp.exe -aspNetName "c:\windows\Microsoft.Net\Framework\v4.0.30319\aspnet_wp.exe"
The value specified should be the value that you would specify if you used the .Net Coverage Validator interface to work with ASP.Net applications.
- -webRoot directoryname
The -webRoot option is used to specify the web root for this ASP.Net process. The directoryname argument should be quoted if the filename contains spaces.-webRoot c:\inetpub\wwwroot -webRoot "c:\inetpub\wwwroot"
- -webBrowser filename
The -webBrowser option is used to specify which web browser to use to open the web page if the user has chosen to specify a particular web browser. This option is used when the -aspNetWeb option specifies to use a specific web browser. The filename argument should be quoted if the filename contains spaces.-webBrowser c:\mozilla\firefox.exe -webBrowser "c:\program files\internet explorer\iexplore.exe"
- -coverageDirectory directoryname
The -coverageDirectory option specifies the directory .Net Coverage Validator will use to communicate with the GUI if security privileges do not allow named pipes and shared memory usage. The directoryname argument should be quoted if the filename contains spaces.-coverageDirectory c:\temp
- -aspNetWeb default|user|specific
The -aspNetWeb option is used to specify which web browser will be used to open the web page you have specified.The options are:default Use the default web browser. user The user will open a web browser themselves. specific Use a web browser identified by a filepath. Use in conjunction with -webBrowser option. -aspNetWeb default -aspNetWeb user -aspNetWeb specfic
- -aspNetDelay integerThe -aspNetDelay option is used to specify how long .Net Coverage Validator will wait for IIS to reset and restart itself. The delay is specified in milliseconds.
-aspNetDelay 5000
Working with .Net services
This example shows how to use .Net Coverage Validator with a .Net service.
dnCoverageValidator.exe -serviceName E:\WindowsService\bin\Debug\WindowsService.exe -coverageDirectory c:\test\coverage -saveSession "c:\test results\testbed.dncvm" -hideUI
- -serviceName E:\WindowsService\bin\Debug\WindowsService.exe
This specifies the service to monitor. The service must be started after .Net Coverage Validator has been instructed to monitor the service. - -coverageDirectory c:\test\coverage
This specifies the directory .Net Coverage Validator will use to communicate with the GUI if security privileges do not allow named pipes and shared memory usage. - -saveSession “c:\test results\testbed.dncvm”
This specifies that after the application finishes the session should be saved in the file c:\test results\testbed.dncvm. - -hideUI
This specifies that the user interface should not be displayed during the test. When the target service closes .Net Coverage Validator will close.
Working with ASP.Net
This example shows how to use .Net Coverage Validator with ASP.Net.
dnCoverageValidator.exe -urlToVisit http://localhost/testWebApp.aspx -aspNetName c:\windows\Microsoft.Net\Framework\v4.0.30319\aspnet_wp.exe -aspNetWeb default -aspNetDelay 5000 -webRoot c:\inetput\wwwroot -coverageDirectory c:\test\coverage -saveSession "c:\test results\testbed.dncvm" -hideUI
- -urlToVisit http://localhost/testWebApp.aspx
This specifies the web page that will be opened when working with ASP.Net - -aspNetName c:\windows\Microsoft.Net\Framework\v4.0.30319\aspnet_wp.exe
This specifies the ASP.Net worker process that IIS will start. - -aspNetWeb default
This specifies that the system defined web browser will be used to open the web page. - -aspNetDelay 5000
This specifies a delay of 5 seconds to allow the IIS webserver to restart. - -webRoot c:\inetput\wwwroot
This specifies the web root of the IIS web server. - -coverageDirectory c:\test\coverage
This specifies the directory .Net Coverage Validator will use to communicate with the GUI if security privileges do not allow named pipes and shared memory usage. - -saveSession “c:\test results\testbed.dncvm”
This specifies that after the application finishes the session should be saved in the file c:\test results\testbed.dncvm. - -hideUI
This specifies that the user interface should not be displayed during the test. When the target service closes .Net Coverage Validator will close.
.Net Memory Validator
- -collectData
The -collectData option causes .Net Memory Validator to collect memory allocation events until the user chooses to disable data collection from the user interface.-collectData
- -doNotCollectData
The -doNotCollectData option causes .Net Memory Validator to ignore memory allocation events until the user chooses to enable data collection from the user interface.-doNotCollectData
- -serviceName fileName
The -serviceName option is used to specify which service .Net Memory Validator should monitor. The filename argument should be quoted if the filename contains spaces.-serviceName c:\path\myservice.exe -serviceName "c:\path with spaces\myservice.exe"
- -urlToVisit url
The -urlToVisit option specifies the web page that should be opened by the web browser when working with ASP.Net web servers.-urlToVisit http://localhost/myTestPage.aspx -urlToVisit "http://localhost/myTestPage.aspx"
- -aspNetName filename
The -aspNetName option is used to specify the ASP.Net process that is used by IIS. The filename argument should be quoted if the filename contains spaces.-aspNetName c:\windows\Microsoft.Net\Framework\v4.0.30319\aspnet_wp.exe -aspNetName "c:\windows\Microsoft.Net\Framework\v4.0.30319\aspnet_wp.exe"
The value specified should be the value that you would specify if you used the .Net Memory Validator interface to work with ASP.Net applications.
- -webRoot directoryname
The -webRoot option is used to specify the web root for this ASP.Net process. The directoryname argument should be quoted if the filename contains spaces.-webRoot c:\inetpub\wwwroot -webRoot "c:\inetpub\wwwroot"
- -webBrowser filename
The -webBrowser option is used to specify which web browser to use to open the web page if the user has chosen to specify a particular web browser. This option is used when the -aspNetWeb option specifies to use a specific web browser. The filename argument should be quoted if the filename contains spaces.-webBrowser c:\mozilla\firefox.exe -webBrowser "c:\program files\internet explorer\iexplore.exe"
- -aspNetWeb default|user|specific
The -aspNetWeb option is used to specify which web browser will be used to open the web page you have specified.The options are:default Use the default web browser. user The user will open a web browser themselves. specific Use a web browser identified by a filepath. Use in conjunction with -webBrowser option. -aspNetWeb default -aspNetWeb user -aspNetWeb specfic
- -aspNetDelay integer
The -aspNetDelay option is used to specify how long .Net Memory Validator will wait for IIS to reset and restart itself. The delay is specified in milliseconds.-aspNetDelay 5000
Working with .Net services
This example shows how to use .Net Memory Validator with a .Net service.
dnMemoryValidator.exe -serviceName E:\WindowsService\bin\Debug\WindowsService.exe -saveSession "c:\test results\testbed.dnmvm" -hideUI
- -serviceName E:\WindowsService\bin\Debug\WindowsService.exe
This specifies the service to monitor. The service must be started after .Net Memory Validator has been instructed to monitor the service. - -saveSession “c:\test results\testbed.dnmvm”
This specifies that after the application finishes the session should be saved in the file c:\test results\testbed.dnmvm. - -hideUI
This specifies that the user interface should not be displayed during the test. When the target service closes .Net Memory Validator will close.
Working with ASP.Net
This example shows how to use .Net Memory Validator with ASP.Net.
dnMemoryValidator.exe -urlToVisit http://localhost/testWebApp.aspx -aspNetName c:\windows\Microsoft.Net\Framework\v4.0.30319\aspnet_wp.exe -aspNetWeb default -aspNetDelay 5000 -webRoot c:\inetput\wwwroot -saveSession "c:\test results\testbed.dnmvm" -hideUI
- -urlToVisit http://localhost/testWebApp.aspx
This specifies the web page that will be opened when working with ASP.Net - -aspNetName c:\windows\Microsoft.Net\Framework\v4.0.30319\aspnet_wp.exe
This specifies the ASP.Net worker process that IIS will start. - -aspNetWeb default
This specifies that the system defined web browser will be used to open the web page. - -aspNetDelay 5000
This specifies a delay of 5 seconds to allow the IIS webserver to restart. - -webRoot c:\inetput\wwwroot
This specifies the web root of the IIS web server. - -saveSession “c:\test results\testbed.dnmvm”
This specifies that after the application finishes the session should be saved in the file c:\test results\testbed.dnmvm. - -hideUI
This specifies that the user interface should not be displayed during the test. When the target service closes .Net Memory Validator will close.
.Net Performance Validator
- -collectData
The -collectData option causes .Net Performance Validator to collect memory allocation events until the user chooses to disable data collection from the user interface.-collectData
- -doNotCollectData
The -doNotCollectData option causes .Net Performance Validator to ignore memory allocation events until the user chooses to enable data collection from the user interface.-doNotCollectData
- -collectFunctionTimes
The -collectFunctionTimes option causes .Net Performance Validator to collect timing information for functions in the application/service/ASP.Net webserver.-collectFunctionTimes
- -collectLineTimes
The -collectLinesTimes option causes .Net Performance Validator to collect timing information for lines in the application/service/ASP.Net webserver.-collectLineTimes
- -doNotCollectFunctionTimes
The -doNotCollectFunctionTimes option causes .Net Performance Validator not to collect timing information for functions in the application/service/ASP.Net webserver.-doNotCollectFunctionTimes
- -doNotCollectLineTimes
The -doNotCollectLinesTimes option causes .Net Performance Validator not to collect timing information for lines in the application/service/ASP.Net webserver.-doNotCollectLineTimes
- -serviceName fileNameThe -serviceName option is used to specify which service .Net Performance Validator should monitor. The filename argument should be quoted if the filename contains spaces.
-serviceName c:\path\myservice.exe -serviceName "c:\path with spaces\myservice.exe"
- -urlToVisit url
The -urlToVisit option specifies the web page that should be opened by the web browser when working with ASP.Net web servers.-urlToVisit http://localhost/myTestPage.aspx -urlToVisit "http://localhost/myTestPage.aspx"
- -aspNetName filename
The -aspNetName option is used to specify the ASP.Net process that is used by IIS. The filename argument should be quoted if the filename contains spaces.-aspNetName c:\windows\Microsoft.Net\Framework\v4.0.30319\aspnet_wp.exe -aspNetName "c:\windows\Microsoft.Net\Framework\v4.0.30319\aspnet_wp.exe"
The value specified should be the value that you would specify if you used the .Net Performance Validator interface to work with ASP.Net applications.
- -webRoot directoryname
The -webRoot option is used to specify the web root for this ASP.Net process. The directoryname argument should be quoted if the filename contains spaces.-webRoot c:\inetpub\wwwroot -webRoot "c:\inetpub\wwwroot"
- -webBrowser filename
The -webBrowser option is used to specify which web browser to use to open the web page if the user has chosen to specify a particular web browser. This option is used when the -aspNetWeb option specifies to use a specific web browser. The filename argument should be quoted if the filename contains spaces.-webBrowser c:\mozilla\firefox.exe -webBrowser "c:\program files\internet explorer\iexplore.exe"
- -profilerDirectory directoryname
The -profilerDirectory option specifies the directory .Net Performance Validator will use to communicate with the GUI if security privileges do not allow named pipes and shared memory usage. The directoryname argument should be quoted if the filename contains spaces.-profilerDirectory c:\temp
- -aspNetWeb default|user|specific
The -aspNetWeb option is used to specify which web browser will be used to open the web page you have specified.The options are:default Use the default web browser. user The user will open a web browser themselves. specific Use a web browser identified by a filepath. Use in conjunction with -webBrowser option. -aspNetWeb default -aspNetWeb user -aspNetWeb specfic
- -aspNetDelay integer
The -aspNetDelay option is used to specify how long .Net Performance Validator will wait for IIS to reset and restart itself. The delay is specified in milliseconds.-aspNetDelay 5000
Working with .Net services
This example shows how to use .Net Performance Validator with a .Net service.
dnPerformanceValidator.exe -serviceName E:\WindowsService\bin\Debug\WindowsService.exe -profilerDirectory c:\test\profiler -saveSession "c:\test results\testbed.dnpvm" -hideUI
- -serviceName E:\WindowsService\bin\Debug\WindowsService.exe
This specifies the service to monitor. The service must be started after .Net Performance Validator has been instructed to monitor the service. - -profilerDirectory c:\test\profiler
This specifies the directory .Net Performance Validator will use to communicate with the GUI if security privileges do not allow named pipes and shared memory usage. - -saveSession “c:\test results\testbed.dnpvm”
This specifies that after the application finishes the session should be saved in the file c:\test results\testbed.dnpvm. - -hideUI
This specifies that the user interface should not be displayed during the test. When the target service closes .Net Performance Validator will close.
Working with ASP.Net
This example shows how to use .Net Performance Validator with ASP.Net.
dnPerformanceValidator.exe -urlToVisit http://localhost/testWebApp.aspx -aspNetName c:\windows\Microsoft.Net\Framework\v4.0.30319\aspnet_wp.exe -aspNetWeb default -aspNetDelay 5000 -webRoot c:\inetput\wwwroot -profilerDirectory c:\test\profiler -saveSession "c:\test results\testbed.dnpvm" -hideUI
- -urlToVisit http://localhost/testWebApp.aspx
This specifies the web page that will be opened when working with ASP.Net - -aspNetName c:\windows\Microsoft.Net\Framework\v4.0.30319\aspnet_wp.exe
This specifies the ASP.Net worker process that IIS will start. - -aspNetWeb default
This specifies that the system defined web browser will be used to open the web page. - -aspNetDelay 5000
This specifies a delay of 5 seconds to allow the IIS webserver to restart. - -webRoot c:\inetput\wwwroot
This specifies the web root of the IIS web server. - -profilerDirectory c:\test\profiler
This specifies the directory .Net Performance Validator will use to communicate with the GUI if security privileges do not allow named pipes and shared memory usage. - -saveSession “c:\test results\testbed.dnpvm”
This specifies that after the application finishes the session should be saved in the file c:\test results\testbed.dnpvm. - -hideUI
This specifies that the user interface should not be displayed during the test. When the target service closes .Net Performance Validator will close.