I am facing the following error which executing a test step. This test step performs a simple function of retrieving value from text file and copying it into excel. The test step does what i am intending but log shows failed with messags "Fail - 0 passes out of total 0 executed." and with the following error message
------------------------------------------------------------
'08/21/2013 11:30:48 AM' - Error encountered during execution.
------------------------------------------------------------
'08/21/2013 11:30:48 AM' - Error inside the callback listener. Error: System.ArgumentNullException: Value cannot be null.
Parameter name: source
at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
at ArtOfTest.WebAii.Design.DesignTimeExecution._runner_TestCompleted(Object sender, TestCompletedEventArgs e)
at ArtOfTest.WebAii.Design.Execution.RunnerController.OnTestCompleted(ExecutionReturnValues result)
at ArtOfTest.WebAii.Design.Execution.RunnerController.CallBackListener()
------------------------------------------------------------
'08/21/2013 11:30:48 AM' - Aborting....
I could not understand where am I going wrong. Can somebody please help me with this. Also, please let me know for further information required.
Regards,
Prerna
6 Answers, 1 is accepted
Its an urgent requirement.
Please excuse me for the delayed reply.
The issue you are experiencing is quite weird, that is not supposed to happen especially when the step passes. Do you override the OnTestCompleted method?
In order to investigate this further we might need you to provide us with your project so we can take a look. Is that possible?
Looking forward to hearing from you.
Ivaylo
Telerik
One way round the issue is to wrap your step in a try/catch block.
e.g.
try
{
[code for steps that still fail once executed]
}catch{
}
This way the code for the step in the try block executes as usual, if an exception is thrown as Test Studio is still trying to perform the already completed step it will move to the empty catch block, pass the step and move onto the next.
Not an ideal fix as it adds a considerable amount of time to the step but it works for me and is letting me continue on with my testing.
Hope this helps
Thank you for your input in helping other customers and sharing the workaround.
I have updated your telerik points accordingly.
Regards,
Ivaylo
Telerik
Hi Support team,
Currently i am working on creating some global function for application (Which include code to handle some functionality related to application) steps followed
1.Created a class file in VSTS
2.inherited that class from BaseWebAiiTest (ex "class Samplecode : BaseWebAiiTest") as i need to use methods from this class
3.Created script step in the test case where i want to use this method.
4.Created object of Samplecode class and access the methods using the object.
when i ran the script then i got the error as below
"InnerException:
System.NullReferenceException: Object reference not set to an instance of an object.
at ArtOfTest.WebAii.Design.BaseWebAiiTest.get_ActiveBrowser()"
Note; when i put same code directly into the script step of the test case (i.e. without using a common function) the script runs successfully.
this is making me to think that cant we access common functions using the object.
Any help on this will be highly appreciated.
Anyone found solution for below error
'10/1/2015 12:40:32 PM' - Error encountered during execution.
------------------------------------------------------------
'10/1/2015 12:40:32 PM' - Error inside the callback listener. Error: System.ArgumentNullException: Value cannot be null.
Parameter name: source
at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
at ArtOfTest.WebAii.Design.DesignTimeExecution._runner_TestCompleted(Object sender, TestCompletedEventArgs e)
at ArtOfTest.WebAii.Design.Execution.RunnerController.OnTestCompleted(ExecutionReturnValues result)
at ArtOfTest.WebAii.Design.Execution.RunnerController.CallBackListener()
------------------------------------------------------------
'10/1/2015 12:40:32 PM' - Aborting....
i have also used
try catch as suggested​ Robert but didn't worked for me.
below is my simple code in script step
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
try
{
Samplecode objsample = new Samplecode();
Log.WriteLine("1");
objsample.ModalpopupNew();
Log.WriteLine("2");
}
catch
{
}
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
is because i am calling a function of another class. (i i directly put the code in script step it works fine for me)