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

Set up test suite #45

Open
splorp opened this issue Sep 15, 2021 · 5 comments
Open

Set up test suite #45

splorp opened this issue Sep 15, 2021 · 5 comments

Comments

@splorp
Copy link
Owner

splorp commented Sep 15, 2021

I’d appreciate any pointers or information on setting something like that up for this project, if that’s something you’d be interested in helping with.

Yes, I can contribute by adding a testsuite in one of the following environments

  • php (phpunit 8)
  • javascript (for example jest)
  • bash (shunit2)

Do you have any preference or suggestions on these environments?

Personally I would make the testsuite very simple: just parse two folders consisting of text files, the folders could be named something like:

  • "false_positive"
  • "false_negative"

The test is successful if any string in any text file of "false_positive" is not detected by the txt list and any string in any text file of "false_negative" is detected by the txt list.

Then run that testsuite on GitHub Actions (before every merge).

That would be cool, what do you think?

Originally posted by @vielhuber in #44 (comment)

@splorp splorp changed the title Set up test suite for false positive and false negative terms Set up test suite Sep 15, 2021
@vielhuber
Copy link

vielhuber commented Sep 15, 2021

I've now implemented a basic test suite.

As said, the testsuite is very simple: just parse two folders consisting of text files:

"/tests/false_positives"
"/tests/false_negatives"

The test is successful if any string in any text file of "false_positives" is not detected by the txt list and any string in any text file of "false_negatives" is detected by the txt list.

Can you have a look at the fork if that generally fits your expectations?

git clone git@github.com:vielhuber/wordpress-comment-blacklist.git .
composer install
./vendor/bin/phpunit

For code changes, see this commit.

If yes, I would integrate GitHub Actions and make a pull request for this repository.

@vielhuber
Copy link

Did you have a chance to have a look at the test suite? Thanks :)

@vielhuber
Copy link

Any update on this?

1 similar comment
@vielhuber
Copy link

Any update on this?

@splorp
Copy link
Owner Author

splorp commented Jan 22, 2022

Sorry, I haven’t had a chance to give this much time.

Moving it up my priority list, though.

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

No branches or pull requests

2 participants