![]() |
![]() |
| |
Chapter 6Putting It All TogetherIn This ChapterThis chapter threads together all the steps involved in using the KCMS test suite with your CMM. The chapter refers you to the appropriate KCMS documentation for details. Development Environment RequirementsThe KCMS packages are automatically placed in a protected directory when you load them with the pkgadd(3) command. Copy the packages to a writable directory for development use. To compile programs, you must use version 4.2 of the Sun Visual Workshop C++ compiler, which is included with Sun Visual Workshop C++ 3.0. Creating Your CMMThe KCMS CMM Developer's Guide and the KCMS CMM Reference Manual are your primary sources of information on how to create a CMM. Setting Up Your CMMGuidelines for setting up your CMM are described in detail in the KCMS CMM Developer's Guide. To set up your CMM,
Creating Test ScriptsIf the test scripts that are packaged with the KCMS DDK are not adequate to test specific features of your custom CMM, you may decide to edit them. If you make any changes (change the names of, add, or delete scripts from the list in icc.ini file or customize the contents of scripts), you may need to create an alternate initialization file or run selected scripts. For details, see Chapter 2, Running KCMS Test Scripts in this guide. The test scripts you create must follow the guidelines for using KCMS functions as described in the SDK manual KCMS Application Developer's Guide. For example, to evaluate profiles used by your CMM, your script first must connect profiles. Prior to connecting profiles, it must create or load profiles. Keep in mind that the test suite can only test attributes it knows about. If your profiles use new attributes, the test scripts cannot test them. For examples of how to set attribute values, see Chapter 5, Setting Attributes. Installing Scripts and ProfilesSo that the kcmstest command can find them, you must install all test scripts in the kcmstest/script directory. Install all profiles you want to use in the test suite in the kcmstest/profiles directory. (See Required File Hierarchy for a description of the KCMS test suite directory hierarchy.) Note that this profile installation is a separate installation from the one to set up your CMM (described in Setting Up Your CMM.) Note - You may choose to install links to the location of your profiles. Testing and Inspecting ResultsFollow the guidelines for running the test scripts described in Chapter 2, Running KCMS Test Scripts. If you just plan to run a few scripts, you can use the kcms_qatest command with command options. See Using kcmstest To Run Test Scripts in Chapter 2. Alternately, if you plan to run a large batch of scripts, the chapter suggests that you use the automated test scripts to do so. See Using Automated Script Files To Run Test Scripts in Chapter 2. Checking Status CodesWhen you have run the scripts, inspect the log file(s). In Chapter 2, "Running KCMS Test Scripts," Example 2-3 shows the log file output for the script shown in Example 2-2 in that same chapter. Status codes return the value 0 if a command completes successfully. Some scripts, however, expect an error to be returned. You can use the XStatus keyword to test for error conditions you expect to occur. The IC_evalerr.scr test script, for example, creates test conditions in which the EVAL: command generates errors. The EVAL: command includes the optional keyword XStatus for reporting expected errors. Code example 5-1 is an excerpt from the IC_evalerr.scr script. The example shows two EVAL: commands that will generate errors because of incorrect or missing information. In each case, XStatus is set to the value 4024 ("KCS_PROF_NO_DATA_SUPPORT_4_REQUEST") See Appendix A, Status Codes for a list of all the status strings and their values. You also can find status codes and strings in the header file kcsstats.h. For additional information on the meaning of status codes, see Chapter 6, "Warnings and Error Messages," in the SDK manual KCMS Application Developer's Guide. Example 6-1 Using XStatus to Report Expected Errors
| |
| |