Repository navigation
test: add missing Crawlee and platform E2E tests - #1248
Merged
Merged
Conversation
…and PPE, `ApifyRequestList`, `use_state` and platform events
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1248 +/- ##
=======================================
Coverage 93.93% 93.93%
=======================================
Files 54 54
Lines 3828 3828
=======================================
Hits 3596 3596
Misses 232 232
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
vdusek
marked this pull request as ready for review
November 11, 2026 13:08
FileDownloadCrawler, crawler abort, reboot and PPE, ApifyRequestList, use_state and platform events
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds E2E tests for SDK and Crawlee paths that had no platform test. Until now the Crawlee suite had only one happy-path crawl per crawler, while the Scrapy suite also covers abort, reboot and PPE.
test_crawlee/test_file_download_crawler.py:FileDownloadCrawler(new in Crawlee 1.10) downloads files in buffered and streamed mode. The test checks that the KVS records have the exact bytes and content type.test_crawlee/test_ppe_crawler.py: a crawler'scontext.push_datastops charging once the run is over itsmax_total_charge_usdbudget.test_crawlee/test_graceful_abort_crawler.py: after a graceful abort, every handled request has its item pushed once, the request in flight stays pending, and the crawler statistics are saved in the KVS.test_crawlee/test_reboot_crawler.py: a crawl of the local site, split by a reboot, visits every page once and keeps its statistics from the first container.test_actor_request_list.py:ApifyRequestList.open()readsrequestListSourcesfrom the Actor input (a directurland arequestsFromUrllist) and passes the requests and their user data to a crawler through the default RQ.test_actor_key_value_store.py::test_use_state_survives_reboot: theActor.use_state()state survives a reboot.test_actor_events.py: a graceful abort calls theABORTINGlistener, andActor.reboot()calls theMIGRATINGandPERSIST_STATE(is_migrating=True) listeners.The test server has two new routes:
/files/<size>.<ext>for binary files and/start-urls.txtfor the URL list. The URL list points toexample.com, because therequestsFromUrlURL extraction only matches hosts with a top-level domain, so it skipslocalhost.✍️ Drafted by Claude Code