Hi Lakshani,
You need to this extension to populate user
org.wso2.carbon.integration.common.extensions.usermgt.UserPopulateExtension.
you will have the following inside extentionClasses under
platformExecutionManager
as below.
<platformExecutionManager>
<extentionClasses>
<class>
<name>org.wso2.carbon.automation.extensions.servers.carbonserver.CarbonServerExtension</name>
<!--<parameter name="-DportOffset" value="0" />-->
<!--<parameter name="cmdArg" value="debug 5005" />-->
</class>
<class>
<name>org.wso2.carbon.integration.common.extensions.usermgt.UserPopulateExtension</name>
</class>
</extentionClasses></platformExecutionManager>
For more information you can refer to this[1] as well.
[1]
https://github.com/wso2/product-apim/blob/master/modules/integration/tests-integration/tests-backend/src/test/resources/automation.xml
Thanks,
Iqbal
On Mon, Nov 23, 2015 at 9:29 PM, Lakshani Gamage <[email protected]> wrote:
> Hi all,
>
> I'm trying to write some tests for app manager and I want to login to
> store with a non admin user. I updated automation.xml as below.
>
> <userManagement>
> <superTenant>
> <tenant domain="carbon.super" key="superTenant">
> <admin>
> <user key="superAdmin">
> <userName>admin</userName>
> <password>admin</password>
> </user>
> </admin>
> <users>
> <user key="testuser1">
> <userName>testuser1</userName>
> <password>testuser1pass</password>
> </user>
> </users>
> </tenant>
> </superTenant>
> <tenants>
> </tenants>
> </userManagement>
>
> But when tests are running, it looks like "testuser1" is not available. It
> gives following exceptions.
>
> java.lang.Exception: Operation not successful: Invalid username or
> password.
> at
> org.wso2.appmanager.integration.utils.VerificationUtil.checkErrors(VerificationUtil.java:35)
> at
> org.wso2.appmanager.integration.utils.APPMStoreRestClient.login(APPMStoreRestClient.java:68)
> at
> org.wso2.appmanager.integration.test.cases.RatingTestCase.testWebAppRating(RatingTestCase.java:78)
>
> Am I missing anything?
>
> Thanks,
> Lakshani
> --
> Lakshani Gamage
>
> *Software Engineer*
> Mobile : +94 (0) 71 5478184 <%2B94%20%280%29%20773%20451194>
>
--
Irham Iqbal
Software Engineer - Test Automation
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware
phone: +94 777888452
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev