Forum Discussion

twozedz's avatar
twozedz
Occasional Contributor
8 years ago

run vba macro from groovy

Hi I have Soap UI pro at work and  i am wondering whether the following can be automated:

 

1) Submit a request in soapui pro. A response is successfully received. This step does'nt need to be automated. I will manually run this.

 

3) Run a vba macro from groovy. The macro's inputs are request and response files from step 1 and also 2 other excel files saved locally. 

 

2) Copy calculated data generated from macro back into soap ui and show it to the user in a nice looking report.

 

 

5 Replies

  • twozedz's avatar
    twozedz
    Occasional Contributor

    sorry, this forum is a waste of time. i hardly get any response and when i do get a response it is worthless

     

    at work i will make sure we dump soap ui for good. waste of money

    • MFagerlind's avatar
      MFagerlind
      Staff

      Hello,

       

      Sorry that you're disappointed, but asking a question in the forums is not the best way to get support.

       

      If you have a SoapUI Pro license, you're entitled to support, so you should open a ticket with Customer care. They will help you, and if they can't they'll reach out to us, the developers.

       

      Kind regards,

      Manne, Ready! API developer

      • prashobkt's avatar
        prashobkt
        Contributor

        twozedz

         

        You can only run macro using DotNet application or VbScript.

        To run a Macro create a DotNet or a VBscript application, invoke it through groovy script.

         

        create an command line exe using Dotnet. 

        =======Dot net code======

        App = new Excel.ApplicationClass()

        object oMissing = System.Reflection.Missing.Value;

        WorkBook = App.Workbooks.Open(
        "your path", oMissing, oMissing, oMissing, oMissing, oMissing,
        oMissing, oMissing, oMissing, oMissing, oMissing, oMissing,
        oMissing, oMissing, oMissing
        );

        App.Run("MacroName", arg1, arg2 , arg3, arg4)

         

        =====================================

         

        Execute the exe using Groovy script.

         

        Groovy:

         

        def cmd = exePath

        def process = "$cmd".execute();

         

        process.waitFor();