Book a Demo

Author Topic: Automated testing update model -> programming  (Read 4507 times)

harvinder

  • EA User
  • **
  • Posts: 30
  • Karma: +0/-0
    • View Profile
Automated testing update model -> programming
« on: December 09, 2013, 05:24:42 pm »
We have created a MDG (workflow language) for writing basic algorithms. The language has basic constructs like assignments, verification etc. These basic constructs have taggedvalues to customise the behavious and are connected through connectors for the flow.

In an addin on a press of a click generate C# code from this workflow.

We wanted to test (automated) that constructs are implemented properly (i.e. right c# code is generated). We approached it by
 
[1] We construct the EA.App and call OpenFile to load the template  eap files from an external application.
[2] We read a configuration file from the file system and modifying the values of the taggedvalues etc.
[3] once we modify the file we save it with  a different name and that becomes our test data.
[4] We close the file and start the process with next configuration file.

We create around 1000 such input files, however, sometime we see COMException. We have tried increasing the memory etc but without fail. and all this is very random.
 
Sometimes the values retrieved from EA changes in the middle of execution.

Has anybody experienced something similar or done something similar?

Cheers
harvinder

PS: I am in the process of writing a smaller application to simulate the problem so that I can share it with the group.

I am using version 935 on win 7 64 bit and Win xp

Another thing to notice is that on Win 8.1 the problem is there but very very rare.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Automated testing update model -> programmi
« Reply #1 on: December 09, 2013, 06:26:18 pm »
It could help if you shared more details about the exception, the stacktrace etc... I think there are many types of COMExceptions.

Geert

« Last Edit: December 09, 2013, 06:26:29 pm by Geert.Bellekens »

harvinder

  • EA User
  • **
  • Posts: 30
  • Karma: +0/-0
    • View Profile
Re: Automated testing update model -> programming
« Reply #2 on: December 09, 2013, 06:52:09 pm »
I just finished modifying/generating 1223 files and I got following 3 COMExceptions. In total there were 5 exceptions.

EaProcess - Exception System.Runtime.InteropServices.COMException (0x800706BA): The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
   at EA.AppClass.get_Repository()
   at TAF.Test.Processor.EAProcessor.GenerateTestSpecification(String eapFile) in c:\Project\AUTO\TAF\test\src\EAProcessor\EaProcessor.cs:line


EaProcess - Exception System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException: The remote procedure call failed. (Exception from HRESULT: 0x800706BE)
   --- End of inner exception stack trace ---
   at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
   at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
   at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args)
   at TAF.Test.Processor.Ea.ModelUpdator.Generate(EaNode treeRoot) in c:\Project\AUTO\TAF\test\src\EAProcessor\Ea\ModelUpdator.cs:line 111


EaProcess - Exception System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException: The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))
   --- End of inner exception stack trace ---
   at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
   at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
   at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args)
   at TAF.Test.Processor.Ea.ModelUpdator.Generate(EaNode treeRoot) in c:\Project\AUTO\TAF\test\src\EAProcessor\Ea\ModelUpdator.cs:line 111

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Automated testing update model -> programming
« Reply #3 on: December 09, 2013, 08:36:01 pm »
Seems like there's an issue getting the repository object from EA.App object.
Could be that it is still loading the repository, or it can't open the .eap file for some reason  (locked?).
It is always on the same .eap file you get the errors, or always different ones?

Have you tried catching the COMException and trying again?
If there's a race condition somewhere, that just might be enough.

Geert