Cancel
Showing results for 
Search instead for 
Did you mean: 

automated regression testing of ufuncs

Valued Contributor
Valued Contributor

Hello

 

My company is investigating how we might do "regression testing" of our NX 9 ufuncs, which have BlockStyler UIs.  That is, we want to be able to test that any of our ongoing modifications of our ufuncs doesn't break their existing required behavior.  And we'd like to automate testing as much as possible.  So far, the best we've come up with is to record macros, and associate screenshots with each -- a human tester runs the macro, which loads a part and a ufunc and exercises some functionality of the ufunc, and then the human tester visually compares the on-screen results with the screenshot.  I suspect there's a better way than this.

 

We use macros because 1) We want non-programmer end-users to be able to write some of these tests, although this is not a hard requirement, and 2) it seems journals can't interact with ufuncs.  Please correct me if I'm wrong about this second point -- is it possible to perhaps have a journal directly call a ufunc's button callbacks, tug on a csys, etc?

 

We have the "check" performed by a human because we don't know how to perform "checks" in NX.  Is there an easy way to specify test conditions, such as "this bend should be a right angle" or "this flange should be 2 inches long"?

 

"Checks" are easier to perform in ufuncs.  But we don't know how to do the rest of the testing in a ufunc.  Is it possible to record a journal or a macro, and then invoke that macro from a ufunc?  Or is it possible to manipulate a csys, click Block UI Styler buttons, etc, from ufunc code?  (Our ufuncs are written in C++ and C, so I'm mostly interested in doing this in those languages, although I'm open to hearing about how to do it even if it requires C# or VB.)

 

Thanks

Keith

5 REPLIES

Re: automated regression testing of ufuncs

Valued Contributor
Valued Contributor

Hmm, it seems maybe CheckMate is what I'm looking for...

Re: automated regression testing of ufuncs

Valued Contributor
Valued Contributor

Re: automated regression testing of ufuncs

Esteemed Contributor
Esteemed Contributor

Note if differences can be found by comparing the final solid bodies, Analysis -> Model Compare may be useful for finding differences.

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled


Re: automated regression testing of ufuncs

Valued Contributor
Valued Contributor

Ah, great.  So I save the "before" part, record a macro that exercises the funtionality under test to transform the part, then save the "after" part.  And then edit the macro to perform Model Compare against the "after" part.

 

The only catch is, like you said, I have to create solid bodies.  Which is turning out to be difficult for the buggy legacy module I'm using, but I think I'm going to try to go down this route anyway.

Re: automated regression testing of ufuncs

Valued Contributor
Valued Contributor
OK, yes, this is working. Thanks!