コード例 #1
0
        private async void btnStart_Click(object sender, System.EventArgs e)
        {
            var config = TryReadHttpTestConfig();

            if (config == null)
            {
                MessageBox.Show(@"输入参数不合法");
                return;
            }

            var testResults = await MainVo.StartTest(config);

            var summary     = TestResultsSummary.Create(testResults.Items);
            var resultsDesc = TestResultsHelper.CreateResultsDesc(testResults, summary);

            this.txtResult.Text = resultsDesc;
        }
コード例 #2
0
        private async void BtnStart_Click(object sender, EventArgs e)
        {
            var config = TryReadHttpTestConfig();

            if (config == null)
            {
                MessageBox.Show(@"输入参数不合法");
                return;
            }

            var testClientSpans = Vo.CreateTestClientSpans(config);
            var testResults     = await Vo.StartTest(config, testClientSpans);

            var summary = TestResultsSummary.Create(testResults.Items);

            this.txtData.Text = testClientSpans.ToJson(true);
            this.txtUri.Text  = config.TraceApiEndPoint;

            testResults.Data = string.Empty;
            var resultsDesc = TestResultsHelper.CreateResultsDesc(testResults, summary);

            this.txtResult.Text = resultsDesc;
        }