Post Regression Testing
Overview
This article will discuss the concept of regression testing and how it applies to post processor developers. The information contained represents the testing procedures used by GibbsCAM software development and may not be tailored to individual third party post developers.
What is Regression Testing
Regression testing is any testing procedure that is looking for some type of change between two things. It is the most common type of testing used in software maintenance and is a very useful tool in understanding how a small change to a software component affects the entire system as a whole. The Wikipedia article on regression testing (https://en.wikipedia.org/wiki/Regression_testing) is an excellent overview of the concept.
Testing Types
There are 2 main types of regression tests that can be run that relate to post processor development. Each type focuses on detecting changes from different sources.
- GibbsCAM Post Regressions. This type of testing compares the output between two different versions of GibbsCAM in order to see what effect changes in the GibbsCAM software have on posting.
- Post Processor Regressions. This type of testing compares the output of two versions of the same post, using the same version of GibbsCAM. This test is useful in validating edits to a specific post processor.
Each type of test is looking for different types of changes, and generally cannot be combined. Different testing tools are available for each type of test.
GibbsCAM Post Regressions
Post regressions have been a large part of the GibbsCAM 2015 development cycle. With so many changes to the GibbsCAM software and its post engine, regression testing has allowed the development team to understand the effects the changes that have been made. This is not to say that this type of testing has ensured that GibbsCAM 2015 will post exactly the same as previous versions, that was never the goal of the update. The regression tests have allowed developers to see that much of the output from previous versions was incorrect, or did not conform to the desired software specification. The regression tests showed all the cases that were different from each version during development, and allowed for these differences to ether be accepted as valid, or rejected. Most fixes for reported bugs in the software resulted in some type of accepted discrepancy in the regression output, since the entire point was to fix the bug that caused the old and incorrect output.
In order to process the vast amount of regression data that was created during these types of tests, a set of regression tools were created. These tools are available to post developers as part of our Post SVN repository, in the Tools/GibbsCAM Regression Tools/ folder. The baseline files (VNC/POST/OUTPUT) are not available due to both size and legal constraints, but the tools are being made available so Third Party Post developers can create their own tests if they need to. It would be considered prudent for Third Party Post developers to use these tools to create tests for any post processors that they have made that have not been sent to the GibbsCAM post department, to ensure that the post processors are written to the GibbsCAM V11 standards. Developers that undertake this type of testing should become familiar with the set of expected differences that are noted on the V11_Posting_Output_Changes article.
Post Processor Regressions
Individual Post Processor regressions are used by post developers to ensure that changes to a specific post processor have had the desired effect on the output. In this case the same version of GibbsCAM is used to test a post processor before and after a change is made, and the differences are evaluated for correctness. All post processor developers do this type of testing already. Compost 4 has a built in scripting system with functions that can be used to help automate these tasks by triggering an automatic posting inside of a GibbsCAM instance (The Compost4 Scripting page has more information [1] )
The Value of Testing
Regression testing is not a Magic Bullet, it will not tell a post developer what posts are Good or Bad. Testing can only show a person what the differences between two things are. It is up to the developer to decide if those changes are valid or not. The regression testing tools can help ensure that a developer does not miss any changes, but they still must be evaluated. The advantage of this type of testing is that it gives the developer certain levels of confidence that the post processor has been tested and that every change is understood. The end result is a better post for the customer, and fewer required changes by the developer.