Test Step Passes but Log show error.

7 posts, 0 answers
  1. PP
    PP avatar
    7 posts
    Member since:
    Apr 2013

    Posted 21 Aug 2013 Link to this post

    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
  2. PP
    PP avatar
    7 posts
    Member since:
    Apr 2013

    Posted 22 Aug 2013 Link to this post

    Can some please help me with this?
    Its an urgent requirement.
  3. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 26 Aug 2013 Link to this post

    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!
  4. Robert
    Robert avatar
    2 posts
    Member since:
    Nov 2013

    Posted 10 Dec 2013 Link to this post

    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
  5. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 11 Dec 2013 Link to this post

    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!
  6. Ruchir
    Ruchir avatar
    3 posts
    Member since:
    Aug 2015

    Posted 30 Sep 2015 in reply to Ivaylo Link to this post

    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.

  7. Sandip
    Sandip avatar
    1 posts
    Member since:
    Oct 2015

    Posted 01 Oct 2015 in reply to Robert Link to this post

    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)
Back to Top