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

tests for WOPI protocol #8712

Open
individual-it opened this issue Mar 21, 2024 · 6 comments
Open

tests for WOPI protocol #8712

individual-it opened this issue Mar 21, 2024 · 6 comments

Comments

@individual-it
Copy link
Member

oCIS is offering WOPI as one of its APIs

currently this API is tested using the wopi-validator and some very basic e2e tests

These tests don't cover anything related to:

  • security
  • spaces
  • shares
  • antivirus
  • public links
  • versions
  • etc.

currently the WOPI service is also re-implemented in #8374

My question is: do we need to have a separate WOPI API test-suite as we have with e.g. WebDAV, TUS, Graph or can be everything tested via unit test and the underlying code-path are tested already with the existing API testsuites?

@jvillafanez @micbar @phil-davis @DeepDiver1975 @dragotin @ScharfViktor ?

@jvillafanez
Copy link
Member

I think we'll need to come up with our own test suite, maybe in parallel with the wopi validator.

The wopi validator runs a series of actions against the the wopi server. Some of them might be preparation of the actual test, and the validator could skip the test if something goes wrong with the preparation, for example if the target file is missing.
This also means that some actions might be difficult to test through the validator. What happens if you try to lock a file but the file doesn't exist? Pretty sure the validator will skip the test because the CheckFileInfo request prior to the Lock fails, so we don't know if the wopi server responds correctly to such Lock request with a 404 code.

There are also potential race conditions or issues regarding the order of operations that we should ensure they don't break anything (we might need to include code to make testing easier). As far as I know, the wopi validator isn't enough for these kind of issues.

The other big thing is that the CheckFileInfo request is tailored to Microsoft so the validator tests pass. Both collabora and onlyoffice include their own set of properties, which I don't think we can test at the moment because the wopi validator will complain.
We'll have to figure out a proper way to support everything (unless we only support microsoft), but we'll need a way to verify that the properties are working, or at least that we send the properties correctly.

@DeepDiver1975
Copy link
Member

The other big thing is that the CheckFileInfo request is tailored to Microsoft so the validator tests pass. Both collabora and onlyoffice include their own set of properties, which I don't think we can test at the moment because the wopi validator will complain.

We need to see how the validator handles this situation. We might even run into situations where not only different properties are expected but the same properties with different values.

But let's see how this works out.

the wopi validator is open source - we can extend it to our needs. Which might be a possible way to go.
(it is basically xml + c# - happy to help out)

@individual-it
Copy link
Member Author

individual-it commented Apr 5, 2024

  1. most things should be covered by unit + integration tests in Go @jvillafanez @rhafer @2403905
  2. make the e2e UI tests run on the new WOPI service (assigned to @SagarGi ) @individual-it @saw-jan
  3. add e2e UI tests to cover the smoke-tests that is done in the release @individual-it @saw-jan [QA] increase test coverage for WOPI service web#10750
  4. create API tests for CheckFileInfo @individual-it @saw-jan
  5. as more functions are added, more wopi validator tests should be switched on @jvillafanez @rhafer @2403905
  6. extend the validator if needed @DeepDiver1975

@ScharfViktor
Copy link
Contributor

  1. add e2e UI tests to cover the smoke-tests that is done in the release @individual-it @saw-jan

Where should we run app-provider e2e tests? Now we run it only web CI. should we include this tests in the ocis CI?

@SagarGi
Copy link
Member

SagarGi commented Apr 9, 2024

  1. add e2e UI tests to cover the smoke-tests that is done in the release @individual-it @saw-jan

Where should we run app-provider e2e tests? Now we run it only web CI. should we include this tests in the ocis CI?

@ScharfViktor since the app-provider tests is not ran in ocis as of now. May be lets stick to running it only web for now ? @saw-jan @individual-it

@ScharfViktor
Copy link
Contributor

@ScharfViktor since the app-provider tests is not ran in ocis as of now. May be lets stick to running it only web for now ? @saw-jan @individual-it

let's make it only in web for now.

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

5 participants