openclover / clover

This repository contains source code of OpenClover Core as well as its integrations: Clover-for-Ant, Clover-for-Eclipse and Clover-for-IDEA plugins. Sources are licensed under Apache 2.0 license.
Other
63 stars 16 forks source link

OC-55 Invoking a constructor and introspecting the class does not create dependency #55

Open marek-parfianowicz opened 4 years ago

marek-parfianowicz commented 4 years ago

Chenguang Zhu created an issue 2018-01-30 Summary: If modifying the number of fields in a class affects the test (e.g., the test uses reflection to check the number of fields in a class), Clover does not select the test in the next execution. This is a safety issue, i,e., Clover may not select tests with changed behavior.

Steps to Reproduce: Run the bash script ./s provided in this directory. This script (1) runs the test class p.CTest with Clover, (2) inserts one more field f3 in the class p.C under test, and (3) runs p.CTest with Clover again.

Expected Results: p.CTest runs both times (it passes in the first run and fails in the second run).

Actual Results: p.CTest runs only the first time (and does not run test the second time).

marek-parfianowicz commented 4 years ago

Original report: https://bitbucket.org/openclover/clover/issues/55