I have scenario to test NXOpen tools having Block styler. where user needs modify different field controls on Block styler. i.e. entering text field, Selecting different option from drop-down control, Toggle options. Finally hit ok to see the result. Similarly, Run the tool under different test cases scenario's from dat file. Do any one have done such automated testing for NXOpen tools.
Solved! Go to Solution.
I believe you can use a macro to run thru a block styler dialog.
However, if you edit the dialog layout/etc., you will have to either edit or re-create the macro.
So the macro would be good if all you are doing is changing the code behind the dialog. But if you are making a lot of dialog changes, it may not be so good.
I'm not sure about journaling - Are block styler dialogs supported by journaling?
Production: NX10.0.3.5 MP16/TC11.2
I'd rather be e-steamed than e-diseaseled
Good Day. Thanks Ken for your Reply.
Since our tool have extensive UI control in our block styler, we couldn't do it successfull with macro as you mentioned. Need to try journal, I have not tried yet. I'm wondering since Block styler .dlx based on xml format, Do direct editing of .dlx will give desired test case result.
I vaguely recall that I have used .NET reflection capabilities to do automated testing of block-based dialogs. By using reflection, you can find out what properties each block has, and you can then set and get these properties. This is a very crude form of testing, and successfully passing the tests certainly does not guarantee that the dialog works properly. But, it does allow you to automate some work that would be very tedious, if done manually.
Reflection is a .NET capability. See the documentation for the System.Reflection namespace, or google for "C# reflection" or something like that. So, you can use reflection to get information about any .NET object, including the NXOpen.BlockStyler.UIBlock objects that are used in NX dialogs.
Java also has a reflection capability, and presumably this could be used to get info about the objects exposed in the NX Java API. But I never use Java, so I can't tell you much about this.