Skip to content

Performance measures

Jakub Raczek edited this page Aug 14, 2016 · 10 revisions

That functionality together with JMeter and Teamcity can be used for measuring performance of a web application on the client and server side. More details can be found here.

Example of performance test:

namespace Objectivity.Test.Automation.Tests.NUnit.Tests
{
    using Automation.Tests.PageObjects.PageObjects.TheInternet;
    using global::NUnit.Framework;

    /// <summary>
    /// Tests to test framework
    /// </summary>
    [TestFixture]
    public class PerformanceTestsNUnit : ProjectTestBase
    {
        [Test]
        [Repeat(3)]
        public void HerokuappTests()
        {
            new InternetPage(this.DriverContext).OpenHomePageAndMeasureTime();
        }
    }
}

Example of Page Object to use Performance measure functionality from our framework, more details here:

        /// <summary>
        /// Methods for this HomePage
        /// </summary>
        /// <returns>Returns Homepage</returns>
        public InternetPage OpenHomePageAndMeasureTime()
        {
            var url = BaseConfiguration.GetUrlValue;
            this.Driver.NavigateToAndMeasureTime(new Uri(url), waitForAjax: true);
            Logger.Info(CultureInfo.CurrentCulture, "Opening page {0}", url);
            return this;
}

Performance class API can be found here.

Clone this wiki locally