Post Unit Testing: Difference between revisions
| (4 intermediate revisions by the same user not shown) | |||
| Line 7: | Line 7: | ||
Compost 4 v4.1.8.1 and later contains a '''Test''' menu. This is where all built in unit testing functions are located. | Compost 4 v4.1.8.1 and later contains a '''Test''' menu. This is where all built in unit testing functions are located. | ||
==Baseline== | ==Baseline Control== | ||
When a post is opened, Compost automatically saves a copy of this post processor in a temporary folder as a 'Baseline' for the current editing session. This post will be used as a starting point for comparisons against later edits to the post. | When a post is opened, Compost automatically saves a copy of this post processor in a temporary folder as a 'Baseline' for the current editing session. This post will be used as a starting point for comparisons against later edits to the post. | ||
The items in the Baseline Control sub-menu in under the Test menu can be used to update the the baseline post to the current working version, or some other file if needed. | The items in the Baseline Control sub-menu in under the Test menu can be used to update the the baseline post to the current working version, or some other file if needed. | ||
==Unit | ==Unit Test From== | ||
3 types of unit tests are available in the software. All 3 tests work the same, but simply use different sets of parts. Unit tests work in 2 stages, baseline and test generation. When a test is run, Compost will trigger it's linked version of GibbsCAM to post all the parts related to the test with first the baseline post, and then the current version of the post. The resulting output from these postings are compared, and a summary is shown to the post developer for review | 3 types of unit tests are available in the software. All 3 tests work the same, but simply use different sets of parts. Unit tests work in 2 stages, baseline and test generation. When a test is run, Compost will trigger it's linked version of GibbsCAM to post all the parts related to the test with first the baseline post, and then the current version of the post. The resulting output from these postings are compared, and a summary is shown to the post developer for review | ||
===Parts | ===Parts With Post=== | ||
This test type will be available, if Compost4 detects part file(s): | This test type will be available, if Compost4 detects part file(s): | ||
* in the same location as the post processor, | * in the same location as the post processor, | ||
| Line 23: | Line 23: | ||
This test will use ALL parts found for the post processor using the above conditions. | This test will use ALL parts found for the post processor using the above conditions. | ||
=== | ===Single Part...=== | ||
This test allows the developer to pick a specific part to use for testing. | This test allows the developer to pick a specific part to use for testing. | ||
=== | ===Suite=== | ||
Post developers can define groups of parts to be | Post developers can define groups of parts to be used as testing suites. These files are located in the user's compost profile folder (The pathfinder script will open the folder when 'Unit Testing Suite' is selected). All parts in the suite are run in this test. | ||
==Test Results== | ==Test Results== | ||
| Line 40: | Line 40: | ||
If there is only one set of differences, a Compost Diff window will be opened showing the differences. | If there is only one set of differences, a Compost Diff window will be opened showing the differences. | ||
If there is more | If there is more than one set of differences, a summary window will be shown that lists the part files that had differences along with a summary of the changes. Controls in the summary window allow a post developer to open a full diff window for any of the files with changes. | ||
[[Category:Applications]] | [[Category:Applications]] | ||
Latest revision as of 22:22, 12 November 2015
Overview
Unit Testing is a way for a post developer to validate that changes to a post processor have had the desired effect. Compost4 contains tools to automate this process.
The Test Menu
Compost 4 v4.1.8.1 and later contains a Test menu. This is where all built in unit testing functions are located.
Baseline Control
When a post is opened, Compost automatically saves a copy of this post processor in a temporary folder as a 'Baseline' for the current editing session. This post will be used as a starting point for comparisons against later edits to the post.
The items in the Baseline Control sub-menu in under the Test menu can be used to update the the baseline post to the current working version, or some other file if needed.
Unit Test From
3 types of unit tests are available in the software. All 3 tests work the same, but simply use different sets of parts. Unit tests work in 2 stages, baseline and test generation. When a test is run, Compost will trigger it's linked version of GibbsCAM to post all the parts related to the test with first the baseline post, and then the current version of the post. The resulting output from these postings are compared, and a summary is shown to the post developer for review
Parts With Post
This test type will be available, if Compost4 detects part file(s):
- in the same location as the post processor,
- in a folder named “parts” that is in the same folder as the post processor,
- in a folder named "parts" in the parent folder of the folder where the post processor is.
This test will use ALL parts found for the post processor using the above conditions.
Single Part...
This test allows the developer to pick a specific part to use for testing.
Suite
Post developers can define groups of parts to be used as testing suites. These files are located in the user's compost profile folder (The pathfinder script will open the folder when 'Unit Testing Suite' is selected). All parts in the suite are run in this test.
Test Results
When a test is run, there can be 3 possible outcomes.
- No Differences
- A single set of differences (usually when only a single part is run)
- Multiple differences
If there are no differences, a summary message will be shown indicating that there were no differences.
If there is only one set of differences, a Compost Diff window will be opened showing the differences.
If there is more than one set of differences, a summary window will be shown that lists the part files that had differences along with a summary of the changes. Controls in the summary window allow a post developer to open a full diff window for any of the files with changes.