Validate Tests

Validation tests are used to execute user-defined verification script(s) in two different HyperWorks versions and compare the output files.

From the Validate Tests tab, you can:
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.



Figure 1.
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.
Based on the selected Ref version, the HyperCrash file type updates.
Unit system
Enabled when HyperCrash is selected from the HW Product menu.
From the Unit System drop-down menu, select the correct unit system.
Functional Script
Write your own set of operations and scripts. Rules and formatting details are documented below.
Click the file folder icon to browse and select the functional script.
Verification Script
Write your own script for output file comparison. Rule and formatting details are documented below.
Activate the checkbox to enable the browse option. Click the file folder icon to browse and select the verification script.
Note: Verification script is optional. If it's not selected, HyperWorks Verification and Validation Harness uses the default diff engine (solverdiff) for output file comparison.
Reference File
Activate the checkbox to enable the browse option. Click the file folder icon to browse and select the reference file.
If a reference file is selected, the functional script is executed only in the current HyperWorks version and the output file will be compared with the reference file.
Note: The reference file is optional. It is useful when you already have the reference file and you don’t want to execute the functional script in two different HyperWorks versions.
Create
Click Create to register the use cases in the Execute tab.

Execute

Registered use cases are listed in the Execute tab. You can register use cases in two ways:
  • Use the Create option (explained above)
  • Use the Catalog file option (Default and Load Test... buttons)


Figure 2.
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.
If the checkbox is OFF, HyperWorks Verification and Validation Harness compares the output file generated in the current version with the reference file (the reference file needs to be provided in the Create option).
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.
<HM_INSTALLATION>/utility/hvvh/tests/validate.psv
Load Tests…
Click Load Tests… to display a file selection browser to select to the catalog file.
Formatting details are documented below.
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.
All other paths should be relative to the root directory. For example, model file and reference file paths (no other hardcoded paths are allowed).
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.
You can write your own catalog file and load all use cases using Load Tests… from the Execute tab.
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>
#UsecaseID|Category|UsecaseName|Tolerance|HWproduct|Unitsystem|IP_file_checkbox|IP_filetype|IP_file|functional_script|Validation_script_checkbox|Validation_script|Ref_file_checkbox|Ref_file
HM_0001|Core|Changing the current component|5|Hypermesh||0|HM||HM_0001.tcl|0||0|
HM_0002|CAD|CAD Export Solidworks to Iges test|5|Hypermesh||0|HM||HM_0002.tcl|0||0|
HM_0003|CAD|Parasolid_import_test|5|Hypermesh||0|HM||HM_0003.tcl|0||0|