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

Deterministic testing #42

Open
bdelespierre opened this issue May 4, 2022 · 0 comments
Open

Deterministic testing #42

bdelespierre opened this issue May 4, 2022 · 0 comments
Assignees
Labels
Milestone

Comments

@bdelespierre
Copy link
Owner

bdelespierre commented May 4, 2022

AlgorithmTest::clusterize fails randomly because it uses randomized data.

PHPUnit 9.5.19 #StandWithUkraine

Runtime:       PHP 8.1.1 with Xdebug 3.1.2
Configuration: /home/benjamin/Workspace/bdelespierre/php-kmeans/phpunit.xml.dist

..................................F

Time: 00:00.167, Memory: 10.00 MB

There was 1 failure:

1) Tests\Unit\Euclidean\AlgorithmTest::testClusterize with data set "3D" (Kmeans\Euclidean\Space Object (...), 2.0, Kmeans\PointCollection Object (...), Kmeans\PointCollection Object (...), Kmeans\PointCollection Object (...))
Failed asserting that 2.096814878707058 is less than 2.0.

/home/benjamin/Workspace/bdelespierre/php-kmeans/tests/Unit/AlgorithmTest.php:87

FAILURES!
Tests: 35, Assertions: 69, Failures: 1.

Generating code coverage report in Clover XML format ... done [00:00.006]

Generating code coverage report in HTML format ... done [00:00.043]

This issue must be solved by effectively removing the randomization part and replacing every dataset by static ones.

@bdelespierre bdelespierre added this to the v3.0 milestone May 4, 2022
@bdelespierre bdelespierre self-assigned this May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant