Won't Fix
Last Updated: 03 Apr 2018 12:15 by ADMIN
Stoil
Created on: 17 Dec 2016 23:22
Type: Bug Report
0
"string cannot have zero length." exception when opening tests with coded steps in vs
Not sure about exact repro. Sometimes when I open a test with coded steps in Visual Studio I get the following error when I try to run it: 

'17-Dec-16 11:23:32 PM' - System.ArgumentException: String cannot have zero length.
   at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type)
   at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
   at System.Reflection.Assembly.GetType(String name)
   at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.EnsureTypeExists(Assembly assm, String typeName)
   at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.CreateCodedTestInstance(Test test, TestResult result, String binariesFolder)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.InternalExecuteTest(Test test, TestResult initializationResult)
   at ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.ExecuteTest(ExecuteTestCommand command)

Closing the test, rebuilding and opening it again seems to work. But I think this same issue also causes problems when the test suite is deployed on remote machines. 
2 comments
ADMIN
Ivaylo
Posted on: 03 Apr 2018 12:15
We do not have stable repro but we are aware of this behavior, as soon as we are able to isolate the problem we will debug and fix it.

Thank you for your understanding.
Stoil
Posted on: 17 Dec 2016 23:36
The coded steps look like this when the problem happens: http://screencast.com/t/fQ0X6vQCh7Po

On remote deploys the same test cases will fail with something like this:
'12/17/2016 5:52:05 AM' - System.ArgumentException: Unable to find the test class type 'MerchantsFM._375_Mass_Uploads___Mass_Driver_Upload__optional_' in your test assembly. Please make sure your test code behind is compiled with your latest changes.
   at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.EnsureTypeExists(Assembly assm, String typeName)
   at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.CreateCodedTestInstance(Test test, TestResult result, String binariesFolder)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.InternalExecuteTest(Test test, TestResult initializationResult)
   at ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.ExecuteTest(ExecuteTestCommand command)

Im seeing this issue quite a lot...