modules/tests/test-integration/src/test/java/org/ballerinalang/test/listener/TestExecutionListener.java
@Override
    public void onExecutionStart() {
        //path of the zip file distribution
        String serverZipPath = System.getProperty(Constant.SYSTEM_PROP_SERVER_ZIP);
        newServer = new ServerInstance(serverZipPath) {
            //config the service files need to be deployed
            @Override
            protected void configServer() {
                //path of the sample bal file directory
                String serviceSampleDir = this.getServerHome() + File.separator + Constant.SERVICE_SAMPLE_DIR;
                //list of sample bal files to be deploy
                String[] serviceFilesArr = listSamples(serviceSampleDir);
                setArguments(serviceFilesArr);
            }
        };
        try {
            newServer.start();
        } catch (Exception e) {
            log.error("Server failed to start. " + e.getMessage(), e);
            throw new RuntimeException("Server failed to start. " + e.getMessage(), e);
        }
    }
/**
     * This method will execute before all the test classes are executed and this will start a server
     * with sample service files deployed.
     *
     */
This method will execute before all the test classes are executed and this will start a server
with sample service files deployed.
This method will execute before all the test classes are executed and this will start a server with sample service files deployed .
@Override
    public void onExecutionStart() {
        String serverZipPath = System.getProperty(Constant.SYSTEM_PROP_SERVER_ZIP);
        newServer = new ServerInstance(serverZipPath) {
            @Override
            protected void configServer() {
                String serviceSampleDir = this.getServerHome() + File.separator + Constant.SERVICE_SAMPLE_DIR;
                String[] serviceFilesArr = listSamples(serviceSampleDir);
                setArguments(serviceFilesArr);
            }
        };
        try {
            newServer.start();
        } catch (Exception e) {
            log.error("Server failed to start. " + e.getMessage(), e);
            throw new RuntimeException("Server failed to start. " + e.getMessage(), e);
        }
    }
@ Override public void onExecutionStart ( ) { String serverZipPath = System . getProperty ( Constant . SYSTEM_PROP_SERVER_ZIP ) ; newServer = new ServerInstance ( serverZipPath ) { @ Override protected void configServer ( ) { String serviceSampleDir = this . getServerHome ( ) + File . separator + Constant . SERVICE_SAMPLE_DIR ; String [ ] serviceFilesArr = listSamples ( serviceSampleDir ) ; setArguments ( serviceFilesArr ) ; } } ; try { newServer . start ( ) ; } catch ( Exception e ) { log . error ( "Server failed to start. " + e . getMessage ( ) , e ) ; throw new RuntimeException ( "Server failed to start. " + e . getMessage ( ) , e ) ; } }
This method will execute before all the test classes are executed and this will start a server
 with sample service files deployed.
This method will execute before all the test classes are executed and this will start a server with sample service files deployed .
//path of the zip file distribution //config the service files need to be deployed //path of the sample bal file directory //list of sample bal files to be deploy