EasyTest Troubleshooting Guide
- 5 minutes to read
This topic provides a list of common issues that may be encountered while using EasyTest, along with ways to resolve them. Follow the recommendations below if you face a problem with EasyTest.
If you face an issue that is not listed here, please do the following. Review the information in the TestExecutor's XML output logs, and in the log file of the application being tested. Information in these files, logged at the moment when the error occurs, may help you understand the cause of the issue. Additionally, ensure that the EasyTest configuration file is located in the same directory as the test script you are attempting to run and contains the correct settings (application names, paths, port numbers). If this does not help, please submit a support ticket, specify how you run the test (from Visual Studio or using TestExecutor) and attach your log files, a screenshot of the error and your project (if possible).
1. The "Failed to start ASP.NET Development server on port" error message is displayed
The following error message is displayed when you try to run an EasyTest script for an ASP.NET application.
Failed to start an ASP.NET Development Server on Port:4030 Error:Only one use of each socket address (protocol/network address/port) is normally permitted.
The port number specified in the error message corresponds to the port number specified in the Url attribute of the EasyTest configuration file's Applications element.
There are many possible issues that can cause this error. The simplest solution is to change the port number specified in the Url attribute to another free port number.
2. A System.ArgumentOutOfRangeException occurs when you try to run an EasyTest script
When running an EasyTest script, the following error message is displayed.
Caught the 'System.ArgumentOutOfRangeException' exception. Exception text: 'Index was out of range. Must be non-negative and less than the size of the collection.' Parameter name: index', stack trace: ' at System.ThrowHelper.ThrowArgumentOutOfRangeException()
You must have administrative privileges to run EasyTest scripts. So if a script fails to run, make sure that you run Visual Studio using the "Run as administrator" option. For additional information, refer to the How to use User Account Control (UAC) document.
3. EasyTest cannot log-on to an application that uses a complex custom splash screen
When trying to run an EasyTest script for an application that uses a complex custom splash screen, the application stays at the LogOn window indefinitely.
If you use a custom splash form, note that EasyTest implies the splash screen form has a "Splash" substring in its name. EasyTest skips such a form at application startup. So, the issue occurs when a name of a class that implements the custom splash form contains no "Splash" substring. There are two options for fixing it.
- Rename the class that implements your custom splash form, so its name contains "Splash" (e.g., MyCustomSplashForm).
Handle the CheckIsFormAcceptable event of the DevExpress.ExpressApp.EasyTest.WinAdapter.ProcessFormsEnumerator class, and set the Cancel parameter to False when the splash form is being processed.
4. A "No connection could be made because the target machine actively refused it 127.0.0.1:4100" error occurs
When trying to run an EasyTest script for a Windows Forms application, the following error occurs.
No connection could be made, because the target machine actively refused it 127.0.0.1:4100
Ensure that the Main method in the Program.cs (Program.vb) file contains the following code.
Check the Windows Forms application definition in the EasyTest configuration file. The FileName attribute must point to an executable that is built with an EasyTest configuration (not Debug or Release). The CommunicationPort value must be 4100, as this is the default port listened to by EasyTest.
<Application Name = "MySolutionWin" FileName="D:\Projects\MySolution\MySolution.Win\Bin\EasyTest\MySolution.Win.exe" AdapterAssemblyName="DevExpress.ExpressApp.EasyTest.WinAdapter.v, Version=.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" CommunicationPort="4100"/>
If you want to use another port, specify the EasyTestCommunicationPort key value in the application configuration file (App.config).
<appSettings> <!-- ... --> <add key="EasyTestCommunicationPort" value="44100"/> <!-- ... --> </appSettings>
- Check that connections to the specified port are not blocked by your firewall and no other software uses that port.
5. Commands are executed too slowly when testing an ASP.NET application
When you test an ASP.NET application, commands are executed too slowly or tests fails to execute with the "WaitCallback - operation is not finished, pending 'setTimeout' handlers" exception.
To run EasyTest for an ASP.NET application correctly, disable the Browser Link feature.
If this document does not contain sufficient information on how to resolve your issue, feel free to contact Developer Express support engineers at the Support Center.