0

Suppose you have a code base that you have been compiling with warning suppressed, and you have decided to enable compiler warnings and refactor the code so the code compiles cleanly.

Many of the code changes will not have any impact on the end functionality of the resulting program.

For instance, code like this:

int     CMyModule::EchoVal(byte b)
{
    return b;
}
. . .
CString CMyModule::GetValue(int id)
{
    int xyzz;
    . . .
    if (id < 128) xyzz = EchoVal(id);

. . .
}

gives you a warning like this:

conversion from 'int' to 'byte', possible loss of data

Most of the changes made are like this -- tweaks to the code can be made that cause the warning to go away, but the resulting code change has no affect on the resulting program's output.

When the new release is delivered to the QA group, what steps should be taken to validate the changes have no impact on the system?

  • 7
    Is there some other answer you are looking for besides "regression testing"? Because "validating that the changes have no impact on the system" is pretty much the definition of regression testing. So, in other words, the testers should just do the same tests they always do, which includes regression testing (I hope). – Jörg W Mittag Jul 29 '17 at 17:22
  • 2
    You're making a big assumption that fixing those warnings will not negatively affect system behavior. How must trust do you have in your automated tests? You have those, right? – RubberDuck Jul 29 '17 at 17:36
  • 1
    Have a read of UB and time travel, then convince me that changing an int to byte is a just a 'tweak' that will result no change of output. – mattnz Jul 30 '17 at 7:52
  • Jorg -- yes, in addition to regression testing, – Jay Elston Jul 30 '17 at 19:32
  • "Many of the code changes will not have any impact on the end functionality", you do test this before handing over the new version? – Kwebble Jul 30 '17 at 21:28
4

The same thing you do for any change. Test all of the things.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.