Exemplo n.º 1
0
        public async Task <Configuration> StartAsync()
        {
            var result = (await _userLoadTestHttpClient.Post(StartConfigurationUrl, GetInputParameters(), null));

            _ui = result.AsJson();
            return(this);
        }
        public async Task Execute(IUserLoadTestHttpClient loadLoadTestHttpClient)
        {
            await loadLoadTestHttpClient.DelayUserClick();

            var postId = (string)loadLoadTestHttpClient.TestState[PostId];

            await loadLoadTestHttpClient.Get($"posts/{postId}");

            await loadLoadTestHttpClient.DelayUserThink();

            var comment = new Dictionary <string, object>
            {
                { "name", "HttpLoadTesting" },
                { "email", "*****@*****.**" },
                { "body", "Comment body" }
            };

            await loadLoadTestHttpClient.Post($"posts/{postId}/comments", comment);
        }