wordpress-comment-blacklist icon indicating copy to clipboard operation
wordpress-comment-blacklist copied to clipboard

Set up test suite

Open splorp opened this issue 4 years ago • 5 comments

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 https://github.com/splorp/wordpress-comment-blacklist/issues/44#issuecomment-918697669

splorp avatar Sep 15 '21 15:09 splorp

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 [email protected]: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 avatar Sep 15 '21 22:09 vielhuber

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

vielhuber avatar Oct 10 '21 22:10 vielhuber

Any update on this?

vielhuber avatar Nov 14 '21 21:11 vielhuber

Any update on this?

vielhuber avatar Jan 17 '22 09:01 vielhuber

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

Moving it up my priority list, though.

splorp avatar Jan 22 '22 21:01 splorp