This is a migrated thread and some comments may be shown as answers.

Test Step Passes but Log show error.

6 Answers 86 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
PP
Top achievements
Rank 1
PP asked on 21 Aug 2013, 06:02 AM
Hi,

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

Sort by
0
PP
Top achievements
Rank 1
answered on 22 Aug 2013, 05:17 AM
Can some please help me with this?
Its an urgent requirement.
0
Ivaylo
Telerik team
answered on 26 Aug 2013, 10:55 AM
Hello Prerna,

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.

Regards,
Ivaylo
Telerik
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Robert
Top achievements
Rank 1
answered on 10 Dec 2013, 03:16 PM
I have encountered this issue too, where a step in test studio fails even thought the step itself has been played back correctly.

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
0
Ivaylo
Telerik team
answered on 11 Dec 2013, 03:31 PM
Hello Robert,

Thank you for your input in helping other customers and sharing the workaround.

I have updated your telerik points accordingly.

Regards,
Ivaylo
Telerik
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Ruchir
Top achievements
Rank 1
answered on 30 Sep 2015, 03:01 PM

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.

0
Sandip
Top achievements
Rank 1
answered on 01 Oct 2015, 07:15 AM
Hi all ,

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)
Tags
General Discussions
Asked by
PP
Top achievements
Rank 1
Answers by
PP
Top achievements
Rank 1
Ivaylo
Telerik team
Robert
Top achievements
Rank 1
Ruchir
Top achievements
Rank 1
Sandip
Top achievements
Rank 1
Share this question
or