Skip to content

Tests_Procedures

fonlow edited this page Aug 31, 2016 · 3 revisions

Procedures of Testing

The procedures described here have been being used since almost day 1 of the project to ensure the quality of the products. The descriptions are not very detailed but presuming you have respective background knowledge already.

Local tests with IIS Express

In the root folder of the VS solution, StartTraceHub.ps1 is to launch Fonlow.TraceHub through IIS Express. And this has the similar effect of using Fonlow.Tracehub as a startup project. However, sometimes it is good to test the hub without launching the Web page since VS IDE will always launch a Web browser even for Web service. While VS 2013 and 2015 have built-in profiling tools, however, sometimes it is good to do stress tests and do basic profiling with Process Explorer or alike, without the interception from VS IDE.

The default settings of Fonlow.TraceConsole and TestTraceListener are for Fonlow.TraceHub launched by VS IDE or the PS1 script.

Local tests with IIS

In VS project Fonlow.TraceHub, CopyForLocalIIS.bat is for deploying the updated codes to a locally installed IIS Website with host name TraceHub.localhost. And the DNS resolution is done in %SystemRoot%\System32\drivers\etc\hosts.

And in projects Fonlow.TraceHubConsole and TestTraceListener, there are bat files for deploying images that are configured to talking to TraceHub hosted in local IIS.

Tests with TraceHub hosted far far awar

This is to ensure TraceHub is communicating with clients fast enough even if the network latency is high.

2 TraceHub instances are hosted in a Windows Server 2012 VM located in US East Coast, while the client tests are done in Australia.

Batch file CopyForCloudDev.bat is for deploying respective images configured to talking to TraceHub hosted in the Cloud.

Checklist

Upload traces from IP addresses not allowed

The allowed addresses is defined in Web.config. Use TestTraceListener.exe to upload a trace from a machine not in the ranges. An error message should appear in the Webpage: message = $"Client calls are restricted, but this address {ipAddress} tries to call." Trace name = "TraceHub"

When HubTraceListener upload the first trace, it should also report its clientType.

The report with source="TraceHub" may be appearing before or after the first trace message in the Web page.