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

16 implement unit tests #19

Merged
merged 6 commits into from
Jan 18, 2024

Conversation

the-siegfried
Copy link
Contributor

Iteration one of unit tests using the 'unittest' library. A further ticket ought to be raised in order to complete the test suite for live testing of a web application. It is felt that either the further tests should test a live application that shall remain static, or the test suite itself should host a static web application of its own to complete the remaining test suites.

Currently the project does not have any unit tests. The implementation of these tests include but are not limited to the following benefits:

  • Ensures that any future development does not introduce any breaking changes.
  • Enables developers and testers to save time when trying to identify bugs.
  • Ensures high quality product development.

Description

Implementation of a test-suite within the modules library (/modules/tests), testing each of the modules and methods in isolation. And the implementation of a functional test suite at the application layer (TorCrawl.py/tests) in order to test all the possible user workflows of the application to ensure the conformity of the project with its requirements.

Types of changes

  • Implements Tests

Checklist:

  • [ x ] My code follows the code style of this project.
  • [ x ] My change requires a change to the documentation.
  • I have updated the documentation accordingly.

MikeMeliz and others added 6 commits April 1, 2022 11:42
…keyword-search

14 implement yara keyword search
- Adds tests folder under 'modules'.
- Creates test files for modules.
- Implements checker passing test cases.

See Issue: MikeMeliz#16
- Adds 'TODO' messages.
- Implements passing test case for crawler.canonical.
- Implements passing test case for crawler.excludes.

- TODO: Implement tests for crawler.crawl against live application.
- TODO: Implement tests for extractor against live application.

See Issue: MikeMeliz#16
- Resolves import errors.

See Issue: MikeMeliz#16
@the-siegfried
Copy link
Contributor Author

Hi @MikeMeliz,

What do you think; should we implement a demo site hosted by the test suite itself?
This feels like the right thing to do. We can't rely on an externally controlled web application for these tests as we don't control what changes that might occur.

I'm, happy to either do this work on this existing branch or on a new one. Just say the word...

@MikeMeliz
Copy link
Owner

Oh wow, it has been almost 2 years since this pull request, but life is crazy lately. My apologies for this @the-siegfried and I can't thank you enough for writing the unit tests for this script!

I'll quickly review them and merge the PR! I'm trying lately to create a personal website for some coding projects, so I'll go ahead and set up a demo site for it.

Many many thanks @the-siegfried!

@MikeMeliz MikeMeliz self-requested a review January 18, 2024 20:16
@MikeMeliz MikeMeliz self-assigned this Jan 18, 2024
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll return for check_tor and check_ip tests, as it would be better to either have the script done those checks natively or from a better source. Either way, it will be an easy improvement.

Copy link
Owner

@MikeMeliz MikeMeliz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great first step to finally have unit tests in this script @the-siegfried! Thank you again, and I'll try to finally find some time on a weekend and finish them!

@MikeMeliz MikeMeliz merged commit dbc8b7e into MikeMeliz:master Jan 18, 2024
@the-siegfried
Copy link
Contributor Author

Hi @MikeMeliz,
You're more than welcome, if you ever need anything in the future feel free to reach out!

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