Troubleshooting- Video Recording

Learn how to use BELLATRIX cross-platform video recording.

Example

[TestFixture]
[Android(Constants.AndroidNativeAppPath,
    Constants.AndroidDefaultAndroidVersion,
    Constants.AndroidDefaultDeviceName,
    Constants.AndroidNativeAppAppExamplePackage,
    ".view.Controls1",
    Lifecycle.ReuseIfStarted)]
public class VideoRecordingTests : AndroidTest
{
    [Test]
    public void ButtonClicked_When_CallClickMethod()
    {
        var button = App.Components.CreateByIdContaining<Button>("button");

        button.Click();
    }
}

Explanations

If it is turned on the engine will capture video for every test and keep them in case the test failed.

Configuration

If you open the testFrameworkSettings.json file, you find the videoRecordingSettings section that controls this behaviour.

"videoRecordingSettings": {
       "isEnabled": "true",
        "waitAfterFinishRecordingMilliseconds": "500",
        "filePath": "C:\\Troubleshooting\\Videos"
}

You can turn off the making of videos for all tests and specify where the videos to be saved. waitAfterFinishRecordingMilliseconds adds some time to the end of the test, making the video not going black immediately. In the extensibility chapters read more about how you can create custom video recorder or change the saving strategy.