locked
Test Agent isn't running tests RRS feed

  • Question

  • Hi All,

    I installed both the Test Controller and Test Agent on the same machine today.  I've successfully added my Agent to the Controller.  And I've successfully added the controller in my VS2010 environment.  I've created 2 testsetting files.  One for Local and one for Remote.

    For my Remote testing, in the Roles section I've selected 'Remote execution' and selected my controller.  For roles, I kept the default <All agents on the controller> and Yes.

    For my Local testing, I left everything as default.

    I can ping my controller/agent pc from my VS2010 pc and vice-versa...no problem.  When I attempt to run a Remote test...my test is in Pending state and never runs.  When I run my Local test, I get "Object reference not set to an instance of an object."

    I've searched around the web for a few hours and tried a few different settings and had no luck. 

    Any ideas?

    Tuesday, April 12, 2011 6:09 PM

Answers

  • Is your TestAgent configured as Interactive process.

    You should use same account for configuring both testagent and test controller which should be and admin on the machine.

    If you have configured your Agent as Interactive process .When you start executing  tests can you see the agent status as running tests.??

     

    Also When you configured your testController for remote Execution in VS can you see The controller as Connected. By this I mean when you give the controller name for remoteExecution can you get the Agent name.??


    ---Mark this post if this Answers or Helps---
    Cheers
    FunnyFox
    • Marked as answer by chuckslik Friday, April 15, 2011 7:20 PM
    Friday, April 15, 2011 6:40 PM

All replies

  • Hi,

    For your Object Reference issue, one reason can be that your test is not getting initialized (don't remember exactly but I read this somewhere in some blog posting or forum thread). To solve this you can use Playback.Initialize() in your [TestInitialize()] method.

    As far as the Controller/Agent Issue is concerned, install the Controller in your VSTS2010 machine and access the agent from there.

    Ping back in case this doesn't help.

     

    Regards,

    Pankaj

    Tuesday, April 12, 2011 6:22 PM
  • Pankaj,

    Sorry for my late response...now that I can focus my attention on this 100%...let's continue our adventure!

    Ok, TestController/Agent are installed on the same machine.  Everything is setup and communicating properly.  Agent is online but when I attempt to run a test, I receive the following error:

    E, 5552, 35, 2011/04/15, 08:33:25.837, 1410284970781, QTAgent32.exe, LoadLibrary() : Unable to find the resource 37382 from assembly C:\WINDOWS\system32\en-US\ieframe.dll.mui: Error1814
    E, 5552, 35, 2011/04/15, 08:33:25.837, 1410294786121, QTAgent32.exe, LoadLibrary() : Unable to find the resource 41728 from assembly C:\WINDOWS\system32\en-US\ieframe.dll.mui: Error1814
    E, 5552, 35, 2011/04/15, 08:33:25.852, 1410301046003, QTAgent32.exe, LoadIEStrings() - Could not find user32 resource assembly in en-CA or en-US
    E, 5552, 35, 2011/04/15, 08:33:26.180, 1411311832456, QTAgent32.exe, IEDOM : Could not get valid window handle of Internet Explorer_server
    W, 5552, 35, 2011/04/15, 08:33:26.180, 1411312319221, QTAgent32.exe, IEDOM : Unable to get the document Window Handle
    E, 5552, 35, 2011/04/15, 08:33:31.816, 1428209398201, QTAgent32.exe, IEDOM : Search : Unable to find element
    E, 5552, 35, 2011/04/15, 08:33:31.816, 1428224026771, QTAgent32.exe, Exception: Microsoft.VisualStudio.TestTools.UITest.Extension.UITestException
        Message: [Web]ControlType='Frame' && TagName='FRAME' && Id='' && Name='contents' && FilterCondition(AbsolutePath='', PageUrl='Contents.aspx', Title='', Class='', ControlDefinition='noResize src="Contents.aspx" name=conten', TagInstance='1')
        Stack Trace:    at Microsoft.VisualStudio.TestTools.UITest.Extension.IE.IETestPlugin.Search(Object parsedQueryIdCookie, IUITechnologyElement parentElement, Int32 maxDepth)
        BaseExceptionMessage: [Web]ControlType='Frame' && TagName='FRAME' && Id='' && Name='contents' && FilterCondition(AbsolutePath='', PageUrl='Contents.aspx', Title='', Class='', ControlDefinition='noResize src="Contents.aspx" name=conten', TagInstance='1')

    E, 5552, 35, 2011/04/15, 08:33:31.816, 1428229936456, QTAgent32.exe, <a class=failure>Playback - {1} [FAILED] Function ElementFetcher::FindScreenElement failed to locate UI element (Searching: ;[Web]ControlType='Frame' && TagName='FRAME' && Id='' && Name='contents' && FilterCondition(AbsolutePath='', PageUrl='Contents.aspx', Title='', Class='', ControlDefinition='noResize src="Contents.aspx" name=conten', TagInstance='1')) (The object specified was not found.)
    \0</a>
    E, 5552, 35, 2011/04/15, 08:33:32.284, 1429629122236, QTAgent32.exe, Playback - [IMAGE] C:\Documents and Settings\jsevigny.LPI\Local Settings\Temp\UITestLogs\LastRun\RPF61.png
    \0
    W, 5552, 35, 2011/04/15, 08:33:32.284, 1429632690931, QTAgent32.exe, Playback - [WARNING] Internal warning: Couldn't find descendants that match QueryId
    \0
    W, 5552, 35, 2011/04/15, 08:33:32.284, 1429645318493, QTAgent32.exe, PERF WARNING: FindAllDescendents: took 3022 ms. Expected it to take maximum 500 ms.
    E, 5552, 35, 2011/04/15, 08:33:32.799, 1431170619668, QTAgent32.exe, AL: Playback Error: Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException: The playback failed to find the control with the given search properties. Additional Details:
    TechnologyName:  'Web'
    ControlType:  'Frame'
    TagName:  'FRAME'
    Id:  ''
    Name:  'contents'
     Failed to find any control that matched the search condition Id='' && Name='contents' && ControlType='Frame' ---> System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component.
       at Microsoft.VisualStudio.TestTools.UITest.Playback.Engine.IScreenElement.FindAllDescendants(String bstrQueryId, Object& pvarResKeys, Int32 cResKeys, Int32 nMaxDepth)
       at Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.FindAllScreenElement(String queryId, Int32 depth, Boolean singleQueryId, Boolean throwException)
       at Microsoft.VisualStudio.TestTools.UITest.Playback.ScreenElement.FindScreenElement(String queryId, Int32 depth)
       at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindFirstDescendant(String queryId, Int32 maxDepth, Int32& timeLeft)
       --- End of inner exception stack trace ---
       at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapControlNotFoundException(COMException ex, IPlaybackContext context)
       at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowComException(COMException innerException, IPlaybackContext context)
       at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException exception, IPlaybackContext context)
       at Microsoft.VisualStudio.TestTools.UITesting.Playback.MapAndThrowException(SystemException exception, String queryId)
       at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindFirstDescendant(String queryId, Int32 maxDepth, Int32& timeLeft)
       at Microsoft.VisualStudio.TestTools.UITesting.SearchHelper.GetUITestControlRecursive(Boolean useCache, Boolean alwaysSearch, ISearchArgument searchArg, IList`1 windowTitles, Int32& timeLeft)
       at Microsoft.VisualStudio.TestTools.UITesting.SearchHelper.GetUITestControlRecursive(Boolean useCache, Boolean alwaysSearch, ISearchArgument searchArg, IList`1 windowTitles, Int32& timeLeft)
       at Microsoft.VisualStudio.TestTools.UITesting.SearchHelper.GetElement(Boolean useCache, ISearchArgument searchArg)
       at Microsoft.VisualStudio.TestTools.UITesting.SearchHelper.Search(ISearchArgument searchArg)
       at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindInternal()
       at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.FindControlIfNecessary()
       at Microsoft.VisualStudio.TestTools.UITesting.UITestControl.SendKeys(String text, ModifierKeys modifierKeys, Boolean isEncoded, Boolean isUnicode)
       at Microsoft.VisualStudio.TestTools.UITesting.Keyboard.SendKeysImplementation(UITestControl control, String text, ModifierKeys modifierKeys, Boolean isEncoded, Boolean isUnicode)
       at Microsoft.VisualStudio.TestTools.UITesting.Keyboard.SendKeysImplementationWrapper(UITestControl control, String text, ModifierKeys modifierKeys, Boolean isEncoded, Boolean isUnicode)
    W, 5552, 35, 2011/04/15, 08:33:32.971, 1431688987508, QTAgent32.exe, IEDOM : StopSession of the plugin called before StartSession
    W, 5552, 35, 2011/04/15, 08:33:32.971, 1431689445856, QTAgent32.exe, UIA : StopSession of the plugin called before StartSession

     

    Which account should I be logged on as?  Admin or the account that runs the process?  I've tried both and I receive the mentioned error.  My first step is to launch IE...and I don't even see it launch.  My tests run as expected locally.
    Any help would be much appreciated.

    Friday, April 15, 2011 12:37 PM
  • Is your TestAgent configured as Interactive process.

    You should use same account for configuring both testagent and test controller which should be and admin on the machine.

    If you have configured your Agent as Interactive process .When you start executing  tests can you see the agent status as running tests.??

     

    Also When you configured your testController for remote Execution in VS can you see The controller as Connected. By this I mean when you give the controller name for remoteExecution can you get the Agent name.??


    ---Mark this post if this Answers or Helps---
    Cheers
    FunnyFox
    • Marked as answer by chuckslik Friday, April 15, 2011 7:20 PM
    Friday, April 15, 2011 6:40 PM
  • Venkatesh,

    I was using the same account, just a different Domain.  A mixed domain situation does work.  The user account that you configure for the Agent must be a member of the Administrators and TeamTestControllerAdmins groups.  No offense to Microsoft, but I thought they would have done most of the leg work to get this running (within a short amount of time).  Now that I have stumbled around for a couple days, I figured it out.  Thanks for the help...this forum rocks!

    Chuckslik

    Friday, April 15, 2011 7:24 PM
  • Also make sure that your VS2010 IDE, Controller and Agent can all communicate with each other.   Verify that DNS is resolving the ip address of each machine.

    I have experienced the "test pending" problem when DNS gave the Controller the wrong ip address for my VS2010 IDE machine.

    • Proposed as answer by G Houston Monday, June 18, 2012 8:44 PM
    Monday, June 18, 2012 8:43 PM