Validate Tests
Validation tests are used to execute user-defined verification script(s) in two different HyperWorks versions and compare the output files.
- Create
- Manually register the use cases in Execute tab.
- Execute
- Execute registered use cases across two HyperWorks versions and compare the output files.
Create
Manually registers use cases from the Execute tab.
- Usecase ID
- Specify the usecase ID, used for registering use cases in the Execute tab.
- Usecase Name
- Specify the usecase name, used for registering use cases in the Execute tab.
- Percentage Tol (%)
- Specify the percentage tolerance value, used for output file comparison in the default diff engine (solverdiff).
- HW Product
- From the HW Product drop-down menu, select a product type: HyperMesh, HyperView, HyperGraph, or HyperCrash.
- Ref HC version
- This option is enabled when HyperCrash is selected from the HW Product menu.
- Unit system
- Enabled when HyperCrash is selected from the HW Product menu.
- Functional Script
- Write your own set of operations and scripts. Rules and formatting details are documented below.
- Verification Script
- Write your own script for output file comparison. Rule and formatting details are documented below.
- Reference File
- Activate the checkbox to enable the browse option. Click the file folder icon to browse and select the reference file.
- Create
- Click Create to register the use cases in the Execute tab.
Execute
- Use the Create option (explained above)
- Use the Catalog file option (Default and Load Test... buttons)
- Current Version
- From the Current Version drop-down menu, select the HyperWorks version.
- Reference Version
- The Reference Version is ON by default (checkbox activated). From the Reference Version drop-down menu, select the HyperWorks version.
- Output directory
- Click the file folder icon, , to select the output directory to store your results.
- Default
- Click Default to load the default catalog file from the installation.
- Load Tests…
- Click Load Tests… to display a file selection browser to select to the catalog file.
- Execute
- Click Execute to execute the functional script in the HyperWorks versions and compare the output files.
- Message log file
- A dynamically created message log file displays the status of the processes in progress. The message log file is a text file and is saved to your output directory.
- HTML Report
- Generates an HTML report of your session information for any number of files run through the process.
Reference Files
- Compare with Existing Reference File(s)
- If you already have the reference file, HyperWorks Verification and Validation Harness has the provision to execute the functional script in the latest HyperWorks version and compare the output file with the existing reference file.
- Execute in Two HyperWorks Versions
- If you don’t have a reference file, the functional script can be executed in two HyperWorks versions and compare the output files.
Output Comparison
- Verification Script and Default Diff Engine (solverdiff)
- If you provide the verification script, HyperWorks Verification and Validation Harness uses it for diffing generated output files, otherwise it uses the default diff engine.
Functional Script Format Rules
- Root Directory Path
- Root directory is the top level directory,which has input models and scripts.
- Output Directory Path
- Functional script should generate all output files at given output directory.
- Example
-
namespace eval ::Validate { set ROOT_DIR “<Installation>/utility/hvvh/tests” set OUT_DIR "C:/EXPORT" set MODEL_FILE "$ROOT_DIR/HM/dataref/HM_0034/main_0000.rad" set REF_FILE "$ROOT_DIR/HM/dataref/HM_0034/main_0000_Validate_ID.out.qaref" set OUTPUT_FILE "$OUT_DIR/main_0000_Validate_ID.out" }
Verification Script Format Rules
- Namespace
- Namespaces used should be
namespace eval ::hvvh::verification {} {}
. - Main Function
- HyperWorks Verification and Validation Harness uses
::hvvh::verification::Main{} {}
as a main function. Comparison logic should be written in it. - Tolerances
- Individual tolerance or percentage tolerances should be declared in a namespaces block and should be used in comparison logic.
- Example
-
namespace eval ::hvvh::verification {} { if {[string first Win [set tcl_platform(os)]] >= 0} { #Windows set ::hvvh::verification::OUT_DIR [file normalize $::env(USERPROFILE)/export] } else { #Linux set ::hvvh::verification::OUT_DIR [file normalize $::env(HOME)/export] } #All differences will be written in DIFF_FILE. set ::hvvh::verification::DIFF_FILE "Diff.txt" #Set tolerances set TOL_SURFACE_AREA 5; set PER_TOL_MOI 0.01; set INTERGER_TOLERANCE_VALUE 1; set DOUBLE_TOLERANCE_VALUE 0.01; } proc ::hvvh::verification::Main {{lst_CurrentOutFile ""} {lst_ReferenceRefFile ""}} { #Write comparison logic here. }
Directory Structure and Catalog File Format
- Directory Structure
- The top level directory should have dataref and
scripts subdirectories.
- Script
- Should contain a subdirectory and functional script inside the subdirecotry (subdirectory name should be same as the functional script).
- Dataref
- Should contain a subdirectory with data files and reference files inside the subdirectory (subdirectory name should be the same as the functional script).
- Example
- Refer to the directory structure at <HW_INSTALLATION/utility/hvvh/tests>
- Catalog File Format
- Catalog file is a pipe, “|”, separate file. It contains all usecases information.
- Example
- Below is part of a catalog file. For more information, please refer to the catalog file at <HW_INSTALLATION/utility/hvvh/tests/validate.psv>