Measure Response Times

Learn how to measure text execution times using BELLATRIX iOS module.

Example

[TestFixture]
[ExecutionTimeUnder(5000, TimeUnit.Milliseconds)]
public class MeasureTestExecutionTimesTests : IOSTest
{
    [Test]
    public void ButtonClicked_When_CallClickMethod()
    {
        var button = App.Components.CreateByName<Button>("ComputeSumButton");

        button.Click();
    }
}

Explanations

[ExecutionTimeUnder(5000, TimeUnit.Milliseconds)]
public class MeasureTestExecutionTimesTests : IOSTest

Sometimes it is useful to use your functional tests to measure performance. Or to just make sure that your app is not slow. To do that BELLATRIX libraries offer the ExecutionTimeUnder attribute. You specify a timeout and if the test is executed over it the test will fail.

using Bellatrix.TestExecutionExtensions.Common.ExecutionTime;

You need to add the NuGet package- Bellatrix.TestExecutionExtensions.Common. After that you need to add a using statement to Bellatrix.TestExecutionExtensions.Common.ExecutionTime