Skip to content

test: Enhance JSON scraping pipeline test #352

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

Merged
merged 1 commit into from
Jun 7, 2024

Conversation

tejhande
Copy link
Contributor

@tejhande tejhande commented Jun 7, 2024

This commit enhances the test suite for the JSON scraping pipeline by introducing the following improvements:

  • Separate configuration from the test code by loading it from a JSON file (config.json)
  • Use a parametrized fixture to run the test with multiple configurations automatically
  • Read the sample JSON file from a separate inputs directory for better organization
  • Add explicit assertions to verify the expected output (list of titles)
  • Improve test organization and separation of concerns using fixtures
  • Promote better coding practices and make the test suite more extensible

These changes aim to improve the testability, maintainability, and flexibility of the test suite. They make it easier to manage configurations, add or modify test cases, and ensure the robustness of the scraping pipeline. The test suite now follows best practices and is better prepared for future changes and requirements.

This commit enhances the test suite for the JSON scraping pipeline by introducing the following improvements:

- Separate configuration from the test code by loading it from a JSON file (config.json)
- Use a parametrized fixture to run the test with multiple configurations automatically
- Read the sample JSON file from a separate inputs directory for better organization
- Add explicit assertions to verify the expected output (list of titles)
- Improve test organization and separation of concerns using fixtures
- Promote better coding practices and make the test suite more extensible

These changes aim to improve the testability, maintainability, and flexibility of the test suite. They make it easier to manage configurations, add or modify test cases, and ensure the robustness of the scraping pipeline. The test suite now follows best practices and is better prepared for future changes and requirements.
@VinciGit00
Copy link
Collaborator

thank you!

@VinciGit00 VinciGit00 merged commit 261c4fc into ScrapeGraphAI:main Jun 7, 2024
2 checks passed
Copy link

github-actions bot commented Jun 9, 2024

🎉 This PR is included in version 1.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link

github-actions bot commented Jun 9, 2024

🎉 This PR is included in version 1.6.0-beta.11 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants