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

Build E2E test flow for backend #81

Open
2 tasks
mimoham24 opened this issue Jul 26, 2021 · 1 comment
Open
2 tasks

Build E2E test flow for backend #81

mimoham24 opened this issue Jul 26, 2021 · 1 comment

Comments

@mimoham24
Copy link
Contributor

User story

Build E2E test flow for reearth-backend to detect degradations.

Acceptance criteria

Completion condition

  • All PRs were passed CI, code-reviewed, and merged
  • E2E test is working as expected, confirmed by @rot1024
@rot1024
Copy link
Member

rot1024 commented Aug 12, 2021

Current concept

  • E2E tests are different from unit tests, so we will create a separate build like cmd/reearth-e2e/main.go.
  • Initialize a GraphQL resolver and send requests to it by calling functions. There is no need to set up a server.
  • Separate database name and file path to save uploaded files for test and production
  • Drop the database (including files) before starting E2E test
  • The test cases are written in a /test/e2e/*.graphql file and the expected responses are written in a .json file of the same name.
    • Just by adding more files, the number of test cases will increase by itself.
    • The main problem is that you have to make sure that the returned ID can be used in the next call.

Research

  • How do you do backend E2E testing for other GraphQL adoption projects? (Not limited to Go) (I want to reinvent the wheel as little as possible)

KeisukeYamashita pushed a commit that referenced this issue Aug 13, 2022
* wip: asset filtering

* asset filtering

* refactoring

* fix naming

* add ability to search by key word
code refactoring

* make the pagination cursor optional

* code restructuring

* fix sort default value

* fix sort default value

* fix sort

* pagination refactoring

* support sort with pagination

* - remove unused code

* - refactor pagination code

* - fix paginationFilter return type

* - code refactoring

* - fix pagination when it contains reverse order

* fix memory

Co-authored-by: yk <yk.eukarya@gmail.com>
Co-authored-by: rot1024 <aayhrot@gmail.com>
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