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

Fix broken tests #74

Open
AlasdairGray opened this issue Mar 16, 2021 · 2 comments
Open

Fix broken tests #74

AlasdairGray opened this issue Mar 16, 2021 · 2 comments
Assignees
Labels
bug Something isn't working Critical

Comments

@AlasdairGray
Copy link
Member

Several tests relied on external pages which have either become unavailable or changed their content.

Some tests have been fixed to URLs in our control, but ideally no test should rely on an external URL.

In commit f06e621 the failing tests were set to be ignored.

@AlasdairGray
Copy link
Member Author

On a fresh checkout of the dev branch, the following errors were obtained (after getting the chromedriver installed and configured):

[ERROR] Tests run: 11, Failures: 1, Errors: 1, Skipped: 0, Time elapsed: 4.462 s <<< FAILURE! - in hwu.elixir.scrape.scraper.ScraperCoreTest
[ERROR] test_getHtml(hwu.elixir.scrape.scraper.ScraperCoreTest)  Time elapsed: 0.461 s  <<< ERROR!
java.lang.NullPointerException
	at hwu.elixir.scrape.scraper.ScraperCoreTest.test_getHtml(ScraperCoreTest.java:127)

[ERROR] test_getHtml_404(hwu.elixir.scrape.scraper.ScraperCoreTest)  Time elapsed: 0.147 s  <<< FAILURE!
java.lang.AssertionError: Expected exception: hwu.elixir.scrape.exceptions.FourZeroFourException
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR]   ScraperCoreTest.test_getHtml_404 Expected exception: hwu.elixir.scrape.exceptions.FourZeroFourException
[ERROR] Errors:
[ERROR]   ScraperCoreTest.test_getHtml:127 NullPointer
[INFO]
[ERROR] Tests run: 35, Failures: 1, Errors: 1, Skipped: 3
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Scraper 0.5.2:
[INFO]
[INFO] Scraper ............................................ SUCCESS [  0.440 s]
[INFO] Scraper ............................................ FAILURE [ 58.737 s]
[INFO] Elixir scraper webapp .............................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  59.329 s
[INFO] Finished at: 2022-06-10T15:02:06+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test (default-test) on project core: There are test failures.

@AlasdairGray
Copy link
Member Author

May be better to do this with GitHub raw pages rather than the HWU servers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Critical
Projects
None yet
Development

No branches or pull requests

2 participants