Hi Amalka, Nuwan,

thanks to both of you. I'll look into it.

Thanks,
Geesara

On Wed, Nov 11, 2015 at 5:04 AM, Nuwan Wimalasekara <nuw...@wso2.com> wrote:

> Hi Geesara,
>
> You can use WebAppDeploymentUtil.isWebApplicationDeployed()[1] method to
> check whether the web application is deployed or not. It will wait and
> return true once the web app got deployed.
>
> [1]
> https://github.com/wso2/product-as/blob/master/modules/integration/tests-common/integration-test-utils/src/main/java/org/wso2/appserver/integration/common/utils/WebAppDeploymentUtil.java
>
> Thanks,
> Nuwanw
>
>
>
> On Tue, Nov 10, 2015 at 11:52 AM, Amalka Subasinghe <ama...@wso2.com>
> wrote:
>
>> We can read the carbon log and check whether there's a web app deployed
>> log.
>>
>> Automation team might know some more options :)
>>
>>
>>
>> On Tue, Nov 10, 2015 at 7:51 PM, Geesara Prathap <gees...@wso2.com>
>> wrote:
>>
>>> Hi Amalka,
>>>
>>> Actually that is what I asked. What sort of logic should be invoked
>>> through a @Before method? I can periodically send requests to service
>>> endpoint check whether service is available or not. But what would be the
>>> proper way to achieve this.
>>>
>>> Thanks,
>>>
>>> On Tue, Nov 10, 2015 at 6:24 PM, Amalka Subasinghe <ama...@wso2.com>
>>> wrote:
>>>
>>>> You can implement some waiting logic to check whether the web app
>>>> deployed in the server and invoke it in @BeforeClass method
>>>>
>>>>
>>>> On Mon, Nov 9, 2015 at 10:25 PM, Geesara Prathap <gees...@wso2.com>
>>>> wrote:
>>>>
>>>>> Hi All,
>>>>>
>>>>> I wrote some integration test cases to test a web service. Here is my
>>>>> the build section of maven configuration looks like.
>>>>>
>>>>> * <build>*
>>>>>
>>>>> *        <plugins>*
>>>>>
>>>>> *            <plugin>*
>>>>>
>>>>> *                <artifactId>maven-war-plugin</artifactId>*
>>>>>
>>>>> *                <version>2.3</version>*
>>>>>
>>>>> *                <configuration>*
>>>>>
>>>>> *                    <webXml>src/main/webapp/WEB-INF/web.xml</webXml>*
>>>>>
>>>>> *                    <warName>${name}</warName>*
>>>>>
>>>>> *
>>>>> <outputDirectory>/home/geesara/wso2/products/wso2as-5.3.0/repository/deployment/server/webapps</outputDirectory>*
>>>>>
>>>>> *                    <goal>*
>>>>>
>>>>> *                    </goal>*
>>>>>
>>>>> *                </configuration>*
>>>>>
>>>>> *            </plugin>*
>>>>>
>>>>>
>>>>> *            <plugin>*
>>>>>
>>>>> *                <artifactId>maven-compiler-plugin</artifactId>*
>>>>>
>>>>> *                <version>3.1</version>*
>>>>>
>>>>> *                <configuration>*
>>>>>
>>>>> *                    <source>1.7</source>*
>>>>>
>>>>> *                    <target>1.7</target>*
>>>>>
>>>>> *                </configuration>*
>>>>>
>>>>> *            </plugin>*
>>>>>
>>>>>
>>>>> *            <plugin>*
>>>>>
>>>>> *                <groupId>org.apache.maven.plugins</groupId>*
>>>>>
>>>>> *                <artifactId>maven-failsafe-plugin</artifactId>*
>>>>>
>>>>> *                <version>2.12.4</version>*
>>>>>
>>>>> *                <executions>*
>>>>>
>>>>> *                    <execution>*
>>>>>
>>>>> *                        <id>integration-test</id>*
>>>>>
>>>>> *                        <goals>*
>>>>>
>>>>> *                            <goal>integration-test</goal>*
>>>>>
>>>>> *                            <goal>verify</goal>*
>>>>>
>>>>> *                        </goals>*
>>>>>
>>>>> *                    </execution>*
>>>>>
>>>>> *                </executions>*
>>>>>
>>>>> *            </plugin>*
>>>>>
>>>>> *        </plugins>*
>>>>>
>>>>> *</build>*
>>>>>
>>>>> As the $subject, How should we wait until web app has been deployed on
>>>>> the server to execute integration test cases.
>>>>>
>>>>> Thanks,
>>>>>
>>>>>
>>>>> --
>>>>> Geesara Prathap Kulathunga
>>>>> Software Engineer
>>>>> WSO2 Inc; http://wso2.com
>>>>> phone: +940772684174
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Amalka Subasinghe
>>>> Senior Software Engineer
>>>> WSO2 Inc.
>>>> Mobile: +94 77 9401267
>>>>
>>>
>>>
>>>
>>> --
>>> Geesara Prathap Kulathunga
>>> Software Engineer
>>> WSO2 Inc; http://wso2.com
>>> phone: +940772684174
>>>
>>
>>
>>
>> --
>> Amalka Subasinghe
>> Senior Software Engineer
>> WSO2 Inc.
>> Mobile: +94 77 9401267
>>
>
>
>
> --
> Nuwan Wimalasekara
> Senior Software Engineer - Test Automation
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> phone: +94 71 668 4620
>
>
>
>


-- 
Geesara Prathap Kulathunga
Software Engineer
WSO2 Inc; http://wso2.com
phone: +940772684174
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to