extract some tests from GitHubCrawlerTest as unit tests
vincent-fuchs opened this issue · 2 comments
Summary
GitHubCrawlerTest is covering quite extensively the crawler behavior, but it has some issues :
- it's actually more of an integration test
- some of the tests that are currently implemented could be written as unit tests.
Type of Issue
It is a :
- [X ] request
Motivation
Build would be faster as tests become unit tests and more robust (sometimes, especially when running the build in local, we see flaky behavior of that test)
Your Environment
- Version used: 1.0.1
are you looking for a functional test ,unit one or a sanity for a new change ?What model of test and factors are assessed so far ?
Most of the test coverage is currently provided by a single test, https://github.com/societe-generale/github-crawler/blob/master/github-crawler-autoconfigure/src/test/java/com/societegenerale/githubcrawler/GitHubCrawlerTest.java .
This is more an integration test, with a fake remote server, posing as a GitHub server (see GitHubMock class) : as you can see, it's fairly complex for a test.
The problem currently is that these tests are brittle : it happens regularly that the build fails for no good reason, because of 1 or 2 tests failing in GitHubCrawlerTest .
we need to see if some of these tests could be removed from GitHubCrawlerTest , and re-implemented as unit tests, while providing the same functional coverage.