Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add component test framework #256

Closed
Kaliumhexacyanoferrat opened this issue Nov 30, 2021 · 1 comment · Fixed by #428
Closed

Add component test framework #256

Kaliumhexacyanoferrat opened this issue Nov 30, 2021 · 1 comment · Fixed by #428
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@Kaliumhexacyanoferrat
Copy link
Owner

As the developer of a web application, I would like to test my application using component tests.

Example

[TestClass]
public sealed class MyTests
{

    [TestMethod]
    public async Task MyTest()
    {
        // setup the project
        var project = ...;

        using var host = TestHost.Run(project);

        var request = host.GetRequest("/myfunc");

        using var response = await host.GetResponse(request);

        Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);
    }

}

Acceptance criteria

  • The functionality is implemented in a new project (e.g. GenHTTP.Testing)
  • The test host allocates an available port when started
  • The hosts allows to easily create requests and read responses
  • Tests can be executed in parallel
@Kaliumhexacyanoferrat Kaliumhexacyanoferrat added the enhancement New feature or request label Nov 30, 2021
@Kaliumhexacyanoferrat Kaliumhexacyanoferrat added this to the Version 8.1 milestone Dec 8, 2023
@Kaliumhexacyanoferrat Kaliumhexacyanoferrat self-assigned this Dec 8, 2023
@Kaliumhexacyanoferrat
Copy link
Owner Author

Additional tasks:

  • Update documentation after release
  • Update project templates after release
  • Update MockH and GenHTTP.Gateway to use this framework after release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant