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

Document Process and Tips for Running Tests when Maintaining them #451

Closed
lukehesluke opened this issue Jul 7, 2021 · 1 comment · Fixed by #586
Closed

Document Process and Tips for Running Tests when Maintaining them #451

lukehesluke opened this issue Jul 7, 2021 · 1 comment · Fixed by #586
Assignees

Comments

@lukehesluke
Copy link
Contributor

lukehesluke commented Jul 7, 2021

  • How to run (1). All of Test Suite (2). Individual tests
  • How to use the config (e.g. NODE_APP_INSTANCE=dev)
  • How to run Test Suite with a local copy of OpenActive.Server.NET

Here's how I personally run Test Suite, which may be helpful:

  • Run OpenActive.Server.NET
    • (cd Examples/BookingSystem.AspNetCore.IdentityServer && dotnet run)
    • (cd Examples/BookingSystem.AspNetCore && dotnet run)
  • Run Broker
    • NODE_APP_INSTANCE=dev npm run start-broker
  • Run individual test
    • NODE_APP_INSTANCE=dev npm run start-tests -- packages/openactive-integration-tests/<path to test file>.js

And then, for quicker feedback, you can run tests in controlled mode, which removes the lengthy process of ingesting and sorting random opportunities by the Broker. To do this:

  • in OpenActive.Server.NET, change OpportunityCount to 1 in FakeBookingSystem.cs (I believe there's an ev var for that)
  • Run the tests with: NODE_APP_INSTANCE=dev NODE_CONFIG='{"integrationTests": {"useRandomOpportunities": false}}' npm run start-tests -- packages/openactive-integration-tests/<path to test file>.js
@github-project-automation github-project-automation bot moved this to 🆕 ODI Questions / New in OpenActive Infrastructure Aug 31, 2023
@nickevansuk nickevansuk moved this from 🆕 ODI Questions / New to 📋 Backlog in OpenActive Infrastructure Aug 31, 2023
@lukehesluke lukehesluke self-assigned this Sep 8, 2023
@lukehesluke
Copy link
Contributor Author

lukehesluke commented Sep 8, 2023

There's a lot of aspects to this issue (before the description was edited to its newer more focused goal):

@lukehesluke lukehesluke changed the title Up-to-date tutorial for how to write a test Document 0rocess and Tips for Running Tests when Maintaining them Sep 8, 2023
@lukehesluke lukehesluke changed the title Document 0rocess and Tips for Running Tests when Maintaining them Document Process and Tips for Running Tests when Maintaining them Sep 8, 2023
@lukehesluke lukehesluke moved this from 📋 Backlog to 🔖 Ready in OpenActive Infrastructure Sep 11, 2023
@lukehesluke lukehesluke moved this from 🔖 Ready to 🏗 In progress in OpenActive Infrastructure Sep 19, 2023
@lukehesluke lukehesluke moved this from 🏗 In progress to 👀 In review in OpenActive Infrastructure Sep 20, 2023
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in OpenActive Infrastructure Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

1 participant