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

Should the parser tests be done separately as unit tests? #18

Closed
Tyrrrz opened this issue Apr 12, 2017 · 1 comment
Closed

Should the parser tests be done separately as unit tests? #18

Tyrrrz opened this issue Apr 12, 2017 · 1 comment
Labels

Comments

@Tyrrrz
Copy link
Owner

Tyrrrz commented Apr 12, 2017

Currently integration tests are verifying both the parsing logic, as well as the integration with Youtube front-end itself.
Earlier I stood by this decision because with the rather few tests we had, it was a lot easier to test everything at once, instead of maintaining mock server responses.
Seeing how there are a lot more tests now, majority of which just verify the integration workflow in various scenarios (normal video, signed video, restricted video, normal playlist, long playlist, etc), it might be a good idea to move part of the assertions to unit tests. That way we can test the parsing logic once in unit tests, while integration tests will only assert conditions that are directly relevant to the scenario.

Pros:

  • Reduce assertion clutter in integration tests
  • Detect parsing issues more reliably with predictable assertions
  • Able to test majority of YTE's logic offline

Cons:

  • Have to maintain and update mock responses when Youtube changes something
  • When something does change, it won't be as easy to detect it as it is now

Open discussion until 19th of April.

@Tyrrrz
Copy link
Owner Author

Tyrrrz commented Apr 19, 2017

Fixed using a compromise in #19

@Tyrrrz Tyrrrz closed this as completed Apr 19, 2017
@Tyrrrz Tyrrrz changed the title Separate verification of parsing logic back to unit tests Should the parser tests be done separately as unit tests? Sep 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant