mabdi / small-amp

Test Amplification for Pharo
MIT License
5 stars 4 forks source link

overwriting test methods: method names matters #70

Closed mabdi closed 4 years ago

mabdi commented 4 years ago

The class OPNullSerializerTest which is the subclass of OPMementoFileSerializerTest overwrites the test methods of the parent.

But, when we generate amplifed version (intermediate ones) we delete the overwriting methods and add new methods (name with postfix). In this case the methods in the super class is called and cause problem.

TODO: the amplified class must be a subclass of class to amplify.

mabdi commented 4 years ago

in the reduced version, don't add original methods anymore.

mabdi commented 4 years ago

in the reduced version, don't add original methods anymore.

Not confirmed. the default test runner doesn't collect all test selectors from superclasses. Revert the change.

mabdi commented 4 years ago

Add this method to all test cases. in ASTHelper.

shouldInheritSelectors
    ^ self superclass shouldInheritSelectors
mabdi commented 4 years ago

in amplified classes, shouldInheritSelectors always should be true

mabdi commented 4 years ago

We have a problem in oracle reduction step. If the mutation produces an error, and this error happens in methods from super, mutation testing marks the mutation as detected without any log. we need to disable shouldInheritSelectors in oracle reducing.