NAVDEMO / RunTests

5 stars 7 forks source link

Message : There is a dialogue box open in another browser window. You must close that dialogue box or sign out. #7

Closed kine closed 5 years ago

kine commented 5 years ago

There is sometime this error when running the tests during development (from VSCode through powershell):

Running c:\git\MSDyn365BC_AppTemplate\TestApp\..\Scripts\Settings.ps1 ...
Running tests in container through navcontainerhelper...
  Codeunit XXXXXX Blablabla Failure (0.393 seconds)
Message : There is a dialogue box open in another browser window. You must close that dialogue box or sign out.
ClientSession in Error
At C:\ProgramData\NavContainerHelper\Extensions\BC\PsTestTool\ClientContext.ps1
:94 char:17
+                 throw "ClientSession in Error"
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (ClientSession in Error:String
   ) [], RuntimeException
    + FullyQualifiedErrorId : ClientSession in Error

Seems mainly when there was opened webclient in browser before running the tests.

kine commented 5 years ago

Even when I remove all sessions on the service tier, I have same error.

freddydk commented 5 years ago

When you run that test in the UI - does a dialog pop up?

kine commented 5 years ago

Yes, this one, because I have multiple codeunits. But It works/worked sometime, because I was able to run the tests before... image

Nothing else.

freddydk commented 5 years ago

In the code - it run RunSelected - not the Run button.

kine commented 5 years ago

Ok, I found the problem... there was another test app, which was removed, but of course, the lines in the test suite were there. Leading to error. When removed, all is ok. It means problem was in data.

Thanks!