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

E2E testing infrastructure #409

Open
habbes opened this issue Aug 15, 2024 · 2 comments
Open

E2E testing infrastructure #409

habbes opened this issue Aug 15, 2024 · 2 comments

Comments

@habbes
Copy link
Contributor

habbes commented Aug 15, 2024

While we do have tests to verify that the generate code looks as expected and compiles without errors, we don't have tests to verify that the code we generate runs as expected. We achieve that using manual testing, which is tedious and not enforced. We should consider setting up automated E2E testing to automate catching issues that we can currently only detect via manual testing.

For example, an E2E test could run the CLI to generate client code based on some schema and settings, add a predefined Program.cs file that calls the generated client code against some test OData service, and verify that the code ran as expected by inspecting the program output.

@rpallares
Copy link

May be another flow could have an asp.net odata server with a simple model and sample data.
The test will run the server and cli generates the client using the fresh csdl.
Then you Can perform E2E tests against that server.
Any server side change is immediately replicated to the client as all parts are built AT the same time.
Sadly there's no tool like https://learn.microsoft.com/fr-fr/aspnet/core/fundamentals/openapi/openapi-tools to generate the csdl file AT build time as WE do for openapi. I resolved that by executing my server with a dedicated parameter to generate it locally in command line.
Not very elegant but it works well.

@paulodero
Copy link
Contributor

@habbes Can we get more examples/scenarios where E2E testing will be needed? Doesn't seem like we need E2E testing to detect conflicts.

@paulodero paulodero added enhancement New feature or request Infrastructure P3 and removed enhancement New feature or request labels Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants