Forum Discussion

Todor_Mollov's avatar
Todor_Mollov
Occasional Contributor
16 years ago

Start mock service on SOAPUI startup

Hi,

Is there a configuraion option that when checked all mock services will be started automatically on SOAPUI startup?

Thanks,
Todor
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi Todor,

    no, but you can add a startup script to your project (in the Project Window) which can start these.. ie

    for( ms in project.mockServiceList )
    {
        // open window
        def dp = com.eviware.soapui.support.UISupport.showDesktopPanel( ms )

        // start mockservice
        ms.start()

        // minimize window
        com.eviware.soapui.SoapUI.desktop.minimize( dp )
    }

    regards!

    /Ole
    eviware.com
  • Todor_Mollov's avatar
    Todor_Mollov
    Occasional Contributor
    Thank you Ole!
    Where am I supposed to put this script exactly?
    "a startup script to your project (in the Project Window) " -
    I added it there - double click on the project , Save script.
    But the services are started only when Save All Projects is pressed.
    They are not started on application startup.
    I'm supposed to do something additionally?

    Thanks,
    Todor
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi!

    this should go into the "Load Script" tab, the script will be run every time you load (ie open) the project.

    regards!

    /Ole
    eviware.com