public TestParameters(TestRunnerType runner, int pointCount)
 {
     PointCount      = pointCount;
     SamplingMode    = Resampling.None;
     AntiAliasing    = false;
     StrokeThickness = 1.0f;
     TestRunner      = runner;
 }
 public TestParameters(TestRunnerType runner, int pointCount, Resampling resampling, bool antialiasing,
                       DataDistribution dataDistribution = DataDistribution.Uniform, int pointsCountThreshold = 100000000, int pointsCount2 = 0)
 {
     DataDistribution    = dataDistribution;
     PointCount          = pointCount;
     PointCountThreshold = pointsCountThreshold;
     PointCount2         = pointsCount2;
     SamplingMode        = resampling;
     AntiAliasing        = antialiasing;
     TestRunner          = runner;
 }
예제 #3
0
        public override async Task Load(ITestSource source)
        {
            var runnerType = TestRunnerType.Find(source);

            if (runnerType != null)
            {
                var runner = runnerType.CreateRunner();
                await runner.Load(source);

                Runners.Add(runner);
            }
            _testSuite = new MultipleTest(Runners.Select(r => r.TestSuite));
        }
        private IEnumerable <TestCase> CreateTestCases(IChartingProvider chartingProvider)
        {
            TimeSpan        duration      = TimeSpan.FromSeconds(10); // Per test
            int             i             = 1;                        // Test Number
            List <TestCase> listTestCases = new List <TestCase>();

            //ChartProviders.Common.Resampling sciChartResampling = Resampling.None;
            ChartProviders.Common.Resampling sciChartResampling = Resampling.Auto;

            TestRunnerType runnerType = TestRunnerType.Composition;

            // (TestRunnerType runnerType = TestRunnerType.DispatcherTimer; runnerType <= TestRunnerType.Composition; runnerType++)
            {
                //Testing the 500x500 series case (many series of few points)
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "100x100, AA On", chartingProvider.LoadNxNRefreshTest(), duration, new TestParameters(runnerType, 100, sciChartResampling, true)
                {
                    StrokeThickness = 1
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "500x500, AA On", chartingProvider.LoadNxNRefreshTest(), duration, new TestParameters(runnerType, 500, sciChartResampling, true)
                {
                    StrokeThickness = 1
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "1000x1000, AA On", chartingProvider.LoadNxNRefreshTest(), duration, new TestParameters(runnerType, 1000, sciChartResampling, true)
                {
                    StrokeThickness = 1
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "100x100, AA On", chartingProvider.LoadNxNRefreshTest(), duration, new TestParameters(runnerType, 100, sciChartResampling, true)
                {
                    StrokeThickness = 2
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "500x500, AA On", chartingProvider.LoadNxNRefreshTest(), duration, new TestParameters(runnerType, 500, sciChartResampling, true)
                {
                    StrokeThickness = 2
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "1000x1000, AA On", chartingProvider.LoadNxNRefreshTest(), duration, new TestParameters(runnerType, 1000, sciChartResampling, true)
                {
                    StrokeThickness = 2
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "100x100, AA On", chartingProvider.LoadNxNRefreshTest(), duration, new TestParameters(runnerType, 100, sciChartResampling, true)
                {
                    StrokeThickness = 5
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "500x500, AA On", chartingProvider.LoadNxNRefreshTest(), duration, new TestParameters(runnerType, 500, sciChartResampling, true)
                {
                    StrokeThickness = 5
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "1000x1000, AA On", chartingProvider.LoadNxNRefreshTest(), duration, new TestParameters(runnerType, 1000, sciChartResampling, true)
                {
                    StrokeThickness = 5
                }));

                // Scatter Series updating. Each test appends N points to a scatter series and a new N points each render. Tests raw fill-rate of the renderer
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "Scatter", chartingProvider.ScatterPointsSpeedTest(), duration, new TestParameters(runnerType, 1000)
                {
                    DataDistribution = DataDistribution.Uniform
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "Scatter", chartingProvider.ScatterPointsSpeedTest(), duration, new TestParameters(runnerType, 5000)
                {
                    DataDistribution = DataDistribution.Uniform
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "Scatter", chartingProvider.ScatterPointsSpeedTest(), duration, new TestParameters(runnerType, 10000)
                {
                    DataDistribution = DataDistribution.Uniform
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "Scatter", chartingProvider.ScatterPointsSpeedTest(), duration, new TestParameters(runnerType, 25000)
                {
                    DataDistribution = DataDistribution.Uniform
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "Scatter", chartingProvider.ScatterPointsSpeedTest(), duration, new TestParameters(runnerType, 100000)
                {
                    DataDistribution = DataDistribution.Uniform
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "Scatter", chartingProvider.ScatterPointsSpeedTest(), duration, new TestParameters(runnerType, 250000)
                {
                    DataDistribution = DataDistribution.Uniform
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "Scatter", chartingProvider.ScatterPointsSpeedTest(), duration, new TestParameters(runnerType, 500000)
                {
                    DataDistribution = DataDistribution.Uniform
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "Scatter", chartingProvider.ScatterPointsSpeedTest(), duration, new TestParameters(runnerType, 1000000)
                {
                    DataDistribution = DataDistribution.Uniform
                }));

                // FIFO Series updating. Tests speed of renderer, resampling and dataseries
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "FIFO", chartingProvider.FifoLineSpeedTest(), duration, new TestParameters(runnerType, 10000, sciChartResampling, true)
                {
                    StrokeThickness = 1
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "FIFO", chartingProvider.FifoLineSpeedTest(), duration, new TestParameters(runnerType, 100000, sciChartResampling, true)
                {
                    StrokeThickness = 1
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "FIFO", chartingProvider.FifoLineSpeedTest(), duration, new TestParameters(runnerType, 1000000, sciChartResampling, true)
                {
                    StrokeThickness = 1
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "FIFO", chartingProvider.FifoLineSpeedTest(), duration, new TestParameters(runnerType, 10000000, sciChartResampling, true)
                {
                    StrokeThickness = 1
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "FIFO", chartingProvider.FifoLineSpeedTest(), duration, new TestParameters(runnerType, 10000, sciChartResampling, true)
                {
                    StrokeThickness = 2
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "FIFO", chartingProvider.FifoLineSpeedTest(), duration, new TestParameters(runnerType, 100000, sciChartResampling, true)
                {
                    StrokeThickness = 2
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "FIFO", chartingProvider.FifoLineSpeedTest(), duration, new TestParameters(runnerType, 1000000, sciChartResampling, true)
                {
                    StrokeThickness = 2
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "FIFO", chartingProvider.FifoLineSpeedTest(), duration, new TestParameters(runnerType, 10000000, sciChartResampling, true)
                {
                    StrokeThickness = 2
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "FIFO", chartingProvider.FifoLineSpeedTest(), duration, new TestParameters(runnerType, 10000, sciChartResampling, true)
                {
                    StrokeThickness = 3
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "FIFO", chartingProvider.FifoLineSpeedTest(), duration, new TestParameters(runnerType, 100000, sciChartResampling, true)
                {
                    StrokeThickness = 3
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "FIFO", chartingProvider.FifoLineSpeedTest(), duration, new TestParameters(runnerType, 1000000, sciChartResampling, true)
                {
                    StrokeThickness = 3
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "FIFO", chartingProvider.FifoLineSpeedTest(), duration, new TestParameters(runnerType, 10000000, sciChartResampling, true)
                {
                    StrokeThickness = 3
                }));

                //  Line Series Appending. Each test appends N lines to an existing series. Does not scroll
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "APPEND", chartingProvider.LineAppendSpeedTest(), duration, new LineAppendTestParameters(runnerType, 10000, 1000, 0, true, sciChartResampling)
                {
                    StrokeThickness = 1.0f
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "APPEND", chartingProvider.LineAppendSpeedTest(), duration, new LineAppendTestParameters(runnerType, 100000, 1000, 1, true, sciChartResampling)
                {
                    StrokeThickness = 1.0f
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "APPEND", chartingProvider.LineAppendSpeedTest(), duration, new LineAppendTestParameters(runnerType, 100000, 10000, 10, true, sciChartResampling)
                {
                    StrokeThickness = 1.0f
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "APPEND", chartingProvider.LineAppendSpeedTest(), duration, new LineAppendTestParameters(runnerType, 1000000, 10000, 100, true, sciChartResampling)
                {
                    StrokeThickness = 1.0f
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "APPEND", chartingProvider.LineAppendSpeedTest(), duration, new LineAppendTestParameters(runnerType, 10000, 1000, 0, true, sciChartResampling)
                {
                    StrokeThickness = 2.0f
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "APPEND", chartingProvider.LineAppendSpeedTest(), duration, new LineAppendTestParameters(runnerType, 100000, 1000, 1, true, sciChartResampling)
                {
                    StrokeThickness = 2.0f
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "APPEND", chartingProvider.LineAppendSpeedTest(), duration, new LineAppendTestParameters(runnerType, 100000, 10000, 10, true, sciChartResampling)
                {
                    StrokeThickness = 2.0f
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "APPEND", chartingProvider.LineAppendSpeedTest(), duration, new LineAppendTestParameters(runnerType, 1000000, 10000, 100, true, sciChartResampling)
                {
                    StrokeThickness = 2.0f
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "APPEND", chartingProvider.LineAppendSpeedTest(), duration, new LineAppendTestParameters(runnerType, 10000, 1000, 0, true, sciChartResampling)
                {
                    StrokeThickness = 5.0f
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "APPEND", chartingProvider.LineAppendSpeedTest(), duration, new LineAppendTestParameters(runnerType, 100000, 1000, 1, true, sciChartResampling)
                {
                    StrokeThickness = 5.0f
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "APPEND", chartingProvider.LineAppendSpeedTest(), duration, new LineAppendTestParameters(runnerType, 100000, 10000, 10, true, sciChartResampling)
                {
                    StrokeThickness = 5.0f
                }));
                listTestCases.Add(new TestCase(i++, chartingProvider.Name, "APPEND", chartingProvider.LineAppendSpeedTest(), duration, new LineAppendTestParameters(runnerType, 1000000, 10000, 100, true, sciChartResampling)
                {
                    StrokeThickness = 5.0f
                }));
            }


            return(listTestCases.ToArray());
        }
예제 #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TestRunnerResults"/> class.   Constructor. </summary>
 /// <param name="success">
 /// A value indicating whether the test run was a success.
 /// </param>
 /// <param name="testRunnerType">
 /// Gets the value denoting the type of the test runner to run.
 /// </param>
 public TestRunnerResults(bool success, TestRunnerType testRunnerType)
 {
     this.Success        = success;
     this.TestRunnerType = testRunnerType;
 }
예제 #6
0
 public static void Register() => TestRunnerType.Add(new NUnitTestRunnerType());
예제 #7
0
		public TestRunDetails(TestRunnerType type, string assembly)
		{
			Type = type;
			Assembly = assembly;
			_testsToRun = new List<string>();
		}
예제 #8
0
 public LineAppendTestParameters(TestRunnerType runner, int pointCount) : base(runner, pointCount)
 {
 }
예제 #9
0
 public LineAppendTestParameters(TestRunnerType runner, int startingPoints, int incrementPoints, double noisyness, bool aa, Resampling resampling)
     : base(runner, startingPoints, resampling, aa)
 {
     IncrementPoints = incrementPoints;
     Noisyness       = noisyness;
 }