Batting takes black screenshots in integration test

We use WatiN - 2.1.0 to take a screenshot when the integration test failed. When performing these tests locally on my virtual machine, all screenshots are recorded correctly (using IE8 or IE9).

However, when they are executed on our integration server:

  • Windows 2008 VM Server
  • Internet explorer 8
  • we run watin tests from the city team using nunit-console

Screenshots recorded during a test error are all black. I reviewed a few posts that cover similar concepts, but they all refer to an earlier version of Watin. Has anyone had similar problems with the latest version?

Screenshot of the test error code:

[TearDown] public void TearDown() { if (TestContext.CurrentContext.Result.State == TestState.Failure || TestContext.CurrentContext.Result.State == TestState.Error) { Browser.BringToFront(); Browser.CaptureWebPageToFile(DateTime.Now.ToString("ddmmyyyyHHmmss") + GetType().Name + ".png"); } Browser.Close(); } 
+6
source share
2 answers

We found our problem. Earlier, we registered on our integration server as a user who tested tests to monitor tests.

If you connect the remote desktop to the test computer, make sure that you restart the computer when you are done, otherwise the desktop will remain locked and the screenshots will not work.

+2
source


This post refers to an identical issue that another user encountered. You tried it.
With respect,
Ashish Narmen

+2
source

Source: https://habr.com/ru/post/891241/


All Articles