Skip to content

Conversation

@honzajavorek
Copy link
Collaborator

@honzajavorek honzajavorek commented Nov 18, 2025

This is a proof of concept how we could test exercises in the academy:

  • Exercises target real world websites, so they can easily break without us knowing
  • We could test them e.g. weekly, so it's not too noisy
  • The solution should be as simple as possible, and capable running both JavaScript and Python
  • While working on the PoC I actually discovered one exercise which is broken 95% of time due to aggressive anti-scraping protections, so I changed it
  • The test can be executed with bats -r --print-output-on-failure .
  • Bats is a simple testing framework based on Bash, which allows to run arbitrary programs and evaluate their output - https://github.com/bats-core/bats-core Not sure yet how to get it inside the CI, but on macOS it's just brew install bats

Todo:

  • Implement JS exercise as well
  • Discuss with the team whether we want this

@honzajavorek honzajavorek added the t-academy Issues related to Web Scraping and Apify academies. label Nov 18, 2025
@honzajavorek honzajavorek changed the title Test Academy exercises chore: test Academy exercises Nov 18, 2025
@honzajavorek honzajavorek force-pushed the honzajavorek/test-exercises branch from ebf76a7 to 05099c1 Compare November 21, 2025 16:35
@apify-service-account
Copy link

Preview for this PR was built for commit 05099c1 and is ready at https://pr-2097.preview.docs.apify.com!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-academy Issues related to Web Scraping and Apify academies.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants