Cancel
Showing results for 
Search instead for 
Did you mean: 

Automated testing of NX Custom tools

Pioneer
Pioneer

Hello All,

 

I am currently trying to automate the testing activities involved in the testing of a NX Custom tool (a tool developed internally to assist the inhouse designers). I have tried out a tool called Auto IT for this purpose but have not been able to achieve the desired results. We are using Block Styler for creating UI's and the back end is written in C# with NX Open and UFUNC API's . The input to the NX custom tool in generally given through the UI fields or by selecting an object in the graphic window. Does anyone here has tried automating the testing of NX Customized tools? 

8 REPLIES

Re: Automated testing of NX Custom tools

Esteemed Contributor
Esteemed Contributor

(hoping...as eventually I need to do this too)

Can you make a journal?

Can you record a Macro?

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 testing of NX Custom tools

Pioneer
Pioneer

Hello Ken_A,

 

Yes for sure Journal and Macro are a possible solution but both of them have limitations. If the UI changes then they have to be recorded again. I was wondering if there's a tool available that identifies the UI and other inputs by some other properties rather then keystrokes or mouse clicks. I tried a tool called Auto IT but it also records the keystokes and mouse clicks and we get a script which does the work in some test cases and fails in some. So it's not stable at all. Have you tried anything else apart from Macro and Journal?

Re: Automated testing of NX Custom tools

Siemens Phenom Siemens Phenom
Siemens Phenom

The statement above regarding journals is absolutely incorrect. Journals are a recorded series of API calls, not a collection of "keystrokes or mouse clicks". One of their advantages is that they are not sensitive to UI changes from release to release.

 

Journals typically work from release to release with no editing required. In rare instances when the API is changed, the old method is typically marked as deprecated, but retained for a release or two. The new method is typically very similar, typically differing in only the argument list required to call the method.

 

I've got journals written in NX 6 (in the "Classic UI") that still run just fine in NX 11 (with the new Ribbon UI). They have survived a complete UI overhaul with no changes required.

 

All of the tens of thousands of NX autotests that Seimens runs on every release for QA are journals. Only a small percentage of these need to be modified each release.

Re: Automated testing of NX Custom tools

Pioneer
Pioneer

Hello JimB,

 

Thanks for the reply and detailed explanation with respect to functioning of journals. I completely agree with you that journals are not recording keystokes or mouse clicks like Macro's but they are recording the series of API calls. The problem that I have encountered while using Journal for testing NX custom tools is that the Journal records the names of the features that a user selects from part navigator or objects that are selected from graphic window while providing input to NX Customized tools. If such a journal is then executed with a new test part it fails because the same feature type is present but with a different name or a same object type is present with a different name. How can we overcome such difficulties while using journals for testing of customized NX tools. It would be really helpfull if you could share how you have overcome such problems.  

Re: Automated testing of NX Custom tools

Esteemed Contributor
Esteemed Contributor

RE: journals not being generic across parts...

 

Try this link (or the NX11 equivalent)

https://docs.plm.automation.siemens.com/tdoc/nx/10/nx_api/#uid:index_nxopen_prog_guide:id1142151:jou...

 

Also I think there is a GTAC article (or 2) covering this area

 

The only thing I'm NOT sure about is if journals work correctly on USER CREATED dialogs (assuming they were created using Block styler)

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 testing of NX Custom tools

Siemens Phenom Siemens Phenom
Siemens Phenom

The NX 11 documnetation also contains a new "Getting Started with NX Open" guide. Chapter 5 deals with turning a recorded journal into a generic application.

 

https://docs.plm.automation.siemens.com/data_services/resources/nx/11/nx_api/common/en_US/graphics/f...

 

Journals will record execution of user defined block styler dialogs in the same manner that they record out of the box block styler dialogs. You will see the API calls referencd and the objects selected, etc.

Re: Automated testing of NX Custom tools

Legend
Legend

Nevertheless, journals are of very limited value for automated testing of custom applications since they don't test the application but the underlying API calls. All you can verify is that the API works as expected.

 

Regards,

Jan

Jan Böttcher

Re: Automated testing of NX Custom tools

Pioneer
Pioneer

Yes I am aware about this documentation. But if we then covert journal into application. It would mean that we are creating a new application to test an existing application. This means that we would enter in an infinite loop Smiley Happy