magefree / magefree/mage

False positive tests with wrong addTarget usage

Open
#11,666 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
2.4k
Forks
940
Avg merge
2d 12h
Merged PRs (30d)
160

Description

Proof of concept added by 2186a49a0f7fae156d118af187d0a37f758190c5, search code by `int takeMaxTargetsPerChoose`, enable max limit to 1 and run tests -- it will show some broken tests.

Reason: wrong `addTarget` usage: wrong command order -- test framework ignore wrong target and try to take a data from next command.

All that tests must enable strict mode and use correct `addTarget`:

![shot_240116_175806](https://github.com/magefree/mage/assets/8344157/7a15549d-a300-4526-aa6c-7abe379871d8)

Contributor guide

No contributing guide indexed for this repository

Research direction

Search the codebase for `int takeMaxTargetsPerChoose` and enable the maximum limit to 1 to reproduce the false-positive tests. Review the affected tests for incorrect `addTarget` command ordering and identify which need strict mode. Done means all affected tests use the correct `addTarget` usage and pass under the enabled limit.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.