Re: [Dev] How to set dynamic width size When adding custom buttons/functions to gadget title in toolbar Dashboard Server
Hi Dakshika,UX Team, Brief Description about the feature and current implementation === Currently I am working on the feature "*Flexibility to add/remove more functions/buttons in the gadget title bar", *that is giving more flexibility to gadget author to add their custom buttons and hide/show default buttons(configurations/maximize/remove) of the gadget title bar*.*You can get more details from above replies as well. - We need to show the disabled button/functions in design view and only need to hide it from view mode of dashboard. - We need to have a design for the indication of disabled buttons/functions in design mode.Simply we can tell that it needs to give a proper impression that the button/function will not be shown in view mode of dashboard. - We need to have proper responsive User Interface in case of gadget author adding more button/functions in gadget title bar.We came up with the solution that we can add drop-down for these huge number of buttons. As per offline discussions with Jerad,Sharon and Sinthuja we came up with the idea to how to show the design and view level functions/buttons, how we are going to show the disabled button in the design mode of dashboard and drop-down list for gadget title bar functions/buttons. Hope I have included all the points .@Jerad Please add if I have missed anything.So it is really helpful that we can have quick meeting on these above topics to proceed further implementation. On Tue, Apr 5, 2016 at 9:37 AM, Jerad Rutnam <je...@wso2.com> wrote: > Hi Rajeenthini, > > Yes, +1. We should have both options, passing an icon class or image icon. > May be we can handle it by giving an extra key-value. > > e.g. > > icon: 'image' || 'css', > image: 'url-path', > css: 'fw fw-icon' > > Cheers! > Jerad > > > On Tue, Apr 5, 2016 at 9:30 AM, Rajeenthini Satkunam <rajeenth...@wso2.com > > wrote: > >> Hi Jerad, >> >> Thank you for your prompt reply.I also have this concern that "passing an >> icon image" as you mentioned above reply since we are maintaining set of >> default icons.But IMHO we need to handle the situation like if the gadget >> author need to add a totally new function/button which icon image is not >> exist already in default icon set. >> >> Your suggestion would be appreciated. >> >> On Tue, Apr 5, 2016 at 8:59 AM, Jerad Rutnam <je...@wso2.com> wrote: >> >>> Hi Rajeenthini, >>> >>> IMO I think we should handle the width from css end. I will help you on >>> it. And have concern in passing an icon image, is this optional? And do we >>> have an option of passing an icon class instead? >>> >>> Regards, >>> Jerad >>> >>> >>> On Tue, Apr 5, 2016 at 7:33 AM, Rajeenthini Satkunam < >>> rajeenth...@wso2.com> wrote: >>> >>>> Hi All, >>>> >>>> Currently I am working on a task that "*Flexibility to add/remove more >>>> functions/buttons in the gadget title bar*".Previously we have >>>> distinct set of 3 buttons/functions(configuration,maximize,remove) in >>>> gadget title bar.By the task I am working on can have more than above three >>>> buttons/functions those are custom buttons specific to each and every >>>> gadgets add by gadget author. >>>> >>>> These custom buttons are adding by gadget author through the >>>> configuration file of gadget(Gadget.json) as below. >>>> >>>> "toolbarButtons":{ >>>> "custom":[ >>>> { >>>> "action": "REFRESH", >>>> "image": "icon://gadget/date-picker/images/stamp.png" >>>> }, >>>> { >>>> "action": "DOWNLOAD", >>>> "image": "icon://gadget/date-picker/images/wifi.png" >>>> } >>>> ], >>>> "default":{ >>>> "maximize": false, >>>> "configuration": true, >>>> "remove": true >>>> } >>>> } >>>> >>>> *Faced Problem* >>>> ** >>>> >>>> When adding more than 3 buttons/functions, the issue that I am facing >>>> is those set of buttons are not present at the title bar it is situated >>>> just below the title bar.You can find the image below. >>>> >>>> >>>> >>>> >>>> In UI/UX perspective my f
Re: [Dev] How to set dynamic width size When adding custom buttons/functions to gadget title in toolbar Dashboard Server
Hi Jerad, Thank you for your prompt reply.I also have this concern that "passing an icon image" as you mentioned above reply since we are maintaining set of default icons.But IMHO we need to handle the situation like if the gadget author need to add a totally new function/button which icon image is not exist already in default icon set. Your suggestion would be appreciated. On Tue, Apr 5, 2016 at 8:59 AM, Jerad Rutnam <je...@wso2.com> wrote: > Hi Rajeenthini, > > IMO I think we should handle the width from css end. I will help you on > it. And have concern in passing an icon image, is this optional? And do we > have an option of passing an icon class instead? > > Regards, > Jerad > > > On Tue, Apr 5, 2016 at 7:33 AM, Rajeenthini Satkunam <rajeenth...@wso2.com > > wrote: > >> Hi All, >> >> Currently I am working on a task that "*Flexibility to add/remove more >> functions/buttons in the gadget title bar*".Previously we have distinct >> set of 3 buttons/functions(configuration,maximize,remove) in gadget title >> bar.By the task I am working on can have more than above three >> buttons/functions those are custom buttons specific to each and every >> gadgets add by gadget author. >> >> These custom buttons are adding by gadget author through the >> configuration file of gadget(Gadget.json) as below. >> >> "toolbarButtons":{ >> "custom":[ >> { >> "action": "REFRESH", >> "image": "icon://gadget/date-picker/images/stamp.png" >> }, >> { >> "action": "DOWNLOAD", >> "image": "icon://gadget/date-picker/images/wifi.png" >> } >> ], >> "default":{ >> "maximize": false, >> "configuration": true, >> "remove": true >> } >> } >> >> *Faced Problem* >> ** >> >> When adding more than 3 buttons/functions, the issue that I am facing is >> those set of buttons are not present at the title bar it is situated just >> below the title bar.You can find the image below. >> >> >> >> >> In UI/UX perspective my finding is gadget title width is calculated as >> below >> >> .gadget .gadget-heading > .gadget-title { >> width: calc(100% - 154px); >> } >> >> >> *The proposed solution==* >> >> We can have a extra property called width for each and every custom >> button and we can get the addition(sum) of widths' of all custom buttons >> and can subtract from 100% of width of title tool bar. >> >> "toolbarButtons":{ >> "custom":[ >> { >> "action": "REFRESH", >> "image": "icon://gadget/date-picker/images/stamp.png", >> >> "width": "7px" >> >> } >> ], >> "default":{ >> "maximize": false, >> "configuration": true, >> "remove": true >> } >> } >> >> .gadget .gadget-heading > .gadget-title { >> width: calc(100% - {Addition of widths}); >> } >> >> *Limitations and problems of proposed solution above* >> ** >> >> - For example in case of adding huge number of custom buttons(100 >> buttons) what will happen to gadget title? >> - Adding different size of button width size will have not proper >> consistent gadget UI. It may different respect to gadget custom button >> widths'. >> - We cannot restrict gadget author to have distinct number of >> buttons/functions(default functions/buttons 5). >> >> Can anyone guide me on this and give me suggestions on "what would be a >> better solution"? >> >> Your suggestions highly appreciated. >> >> -- >> >> *Thank You.* >> >> *Rajeenthini Satkunam* >> >> *Associate Software Engineer | WSO2* >> >> >> *E:rajeenth...@wso2.com <rajeenth...@wso2.com>* >> >> *M :+94770832823 <%2B94770832823> * >> >> > > > -- > *Jerad Rutnam* > *Software Engineer* > > WSO2 Inc. > lean | enterprise | middleware > M : +94 77 959 1609 | E : je...@wso2.com | W : www.wso2.com > -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com <rajeenth...@wso2.com>* *M :+94770832823 * ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
[Dev] How to set dynamic width size When adding custom buttons/functions to gadget title in toolbar Dashboard Server
Hi All, Currently I am working on a task that "*Flexibility to add/remove more functions/buttons in the gadget title bar*".Previously we have distinct set of 3 buttons/functions(configuration,maximize,remove) in gadget title bar.By the task I am working on can have more than above three buttons/functions those are custom buttons specific to each and every gadgets add by gadget author. These custom buttons are adding by gadget author through the configuration file of gadget(Gadget.json) as below. "toolbarButtons":{ "custom":[ { "action": "REFRESH", "image": "icon://gadget/date-picker/images/stamp.png" }, { "action": "DOWNLOAD", "image": "icon://gadget/date-picker/images/wifi.png" } ], "default":{ "maximize": false, "configuration": true, "remove": true } } *Faced Problem* ** When adding more than 3 buttons/functions, the issue that I am facing is those set of buttons are not present at the title bar it is situated just below the title bar.You can find the image below. In UI/UX perspective my finding is gadget title width is calculated as below .gadget .gadget-heading > .gadget-title { width: calc(100% - 154px); } *The proposed solution==* We can have a extra property called width for each and every custom button and we can get the addition(sum) of widths' of all custom buttons and can subtract from 100% of width of title tool bar. "toolbarButtons":{ "custom":[ { "action": "REFRESH", "image": "icon://gadget/date-picker/images/stamp.png", "width": "7px" } ], "default":{ "maximize": false, "configuration": true, "remove": true } } .gadget .gadget-heading > .gadget-title { width: calc(100% - {Addition of widths}); } *Limitations and problems of proposed solution above* ** - For example in case of adding huge number of custom buttons(100 buttons) what will happen to gadget title? - Adding different size of button width size will have not proper consistent gadget UI. It may different respect to gadget custom button widths'. - We cannot restrict gadget author to have distinct number of buttons/functions(default functions/buttons 5). Can anyone guide me on this and give me suggestions on "what would be a better solution"? Your suggestions highly appreciated. -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com <rajeenth...@wso2.com>* *M :+94770832823 * ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] [VOTE] Release WSO2 Dashboard Server 2.0.0 RC1
Hi, I have tested following features related to "Gadget/Wdiget Maximization" and "Enable gadget/widget userPref settings in view mode" - Verify an editor can maximize gadgets/widgets in the Edit mode - Verify an editor can maximize gadgets/widgets in the View mode - Verify a viewer can maximize gadgets/widgets in the dashboard - Verify a viewer can maximize gadgets/widgets in the dashboard in personalize mode - Verify an external viewer can maximize gadgets/widgets in the dashboard - Verify an editor can change the settings of gadgets/widgets in the Edit mode - Verify an editor can change the settings of gadgets/widgets in the View mode - Verify a viewer can change the settings of gadgets/widgets in the View mode - Verify a viewer can change the settings of gadgets/widgets in the "Personalize" mode - Verify an external viewer cannot change the settings of gadgets/widgets in the dashboard And also I have tested the basic features with browsers Chrome version 48.0.2564.116 (64-bit) , Firefox version 42.0 and IE 10,9,8. There is an issue with Browser IE version 10 and less than 10 versions(9,8).I have created a jira[1] for that.You can find it for more details. [1] - https://wso2.org/jira/browse/UES-882 [+] Stable - Go ahead and release On Tue, Feb 23, 2016 at 9:19 AM, Lalanke Athauda <lala...@wso2.com> wrote: > Hi, > I have tested the following features related to "Per user dashboard > theming - Banners" > >- Verify the banner image can be cropped appropriately >- Verify a user can remove the banner once uploaded >- Verify an editor can view the uploaded banner >- Verify an uploaded banner is loaded into the anonymous view >- Verify the same banner is uploaded to a new page added with banner >layout >- Verify the banner is displayed in both pages when toggle between the >anon and default views >- Verify changing the banner in one page will change all the banners >in other pages >- Verify removing a banner in one page will remove all the banners in >other pages >- Verify a viewer can view a dashboard with banner >- Verify a viewer can personalize a dashboard with banner >- Verify a viewer can remove the banner after personalizing a >dashboard with a banner >- Verify an anonymous view with a banner layout can be viewed by >outsiders >- Verify an anonymous view with a banner layout can be viewed by >tenants in other domains >- Verify the view is displayed correctly when there is no banner >uploaded for a banner layout > > And also tested authentication with SSO and Oauth token retrieval features. > > [+] Stable - Go ahead and release. > > > On Tue, Feb 23, 2016 at 8:04 AM, Udara Rathnayake <uda...@wso2.com> wrote: > >> >> >> On Mon, Feb 22, 2016 at 7:57 AM, Udara Rathnayake <uda...@wso2.com> >> wrote: >> >>> tested dashboard creation flow in Firefox/Chromium on Linux (super >>> tenant/tenant) >>> ran zap tool pointing portal app >>> >> I have also tested SSO scenarios(portal app, dashboard) using an >> external IS. >> >> >>> >>> [+] Stable- go ahead and release >>> >>> On Sat, Feb 20, 2016 at 7:51 AM, Tanya Madurapperuma <ta...@wso2.com> >>> wrote: >>> >>>> Hi Devs, >>>> >>>> This is the RC release candidate of WSO2 Dashboard Server 2.0.0 >>>> >>>> Please download DS 2.0.0 RC1 and test the functionality and vote. Vote >>>> will be open for 72 hours or as needed. >>>> >>>> Source & binary distribution files: >>>> https://github.com/wso2/product-ds/releases/tag/v2.0.0-RC1 >>>> >>>> Maven staging repo: >>>> http://maven.wso2.org/nexus/content/repositories/orgwso2ds-358/ >>>> >>>> The tag to be voted upon: >>>> https://github.com/wso2/product-ds/tree/v2.0.0-RC1 >>>> >>>> >>>> [+] Stable - go ahead and release >>>> [-] Broken - do not release (explain why) >>>> >>>> Thanks and Regards, >>>> ~ WSO2 DS Team ~ >>>> >>>> -- >>>> Tanya Madurapperuma >>>> >>>> Senior Software Engineer, >>>> WSO2 Inc. : wso2.com >>>> Mobile : +94718184439 >>>> Blog : http://tanyamadurapperuma.blogspot.com >>>> >>> >>> >>> >>> -- >>> Regards, >>> UdaraR >>> >> >> >> >> -- >> Regards, >> UdaraR >> > > > > -- > Lalanke Athauda > Software Engineer > WSO2 Inc. > Mobile: 0772264301 > -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com <rajeenth...@wso2.com>* *M :+94770832823 * ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Selenium UI Testing [GREG/ES - Publisher]
Hi lahiru, If you need to check that element is present in the current UI, You can go with this method *isElementPresent(By by)*. for example in your case *driver.**isElementPresent**(By.id("elemnt_id")) *will return true if the element is present in current UI or else it will return false.Hope it will help you. For your reference [1] - https://github.com/wso2/product-ds/blob/master/modules/integration/tests-ui-integration/ui-test-utils/src/main/java/org/wso2/ds/ui/integration/util/DSWebDriver.java#L47 On Tue, Feb 9, 2016 at 3:01 PM, Lahiru J Ekanayake <lahi...@wso2.com> wrote: > Hi , > > I'm writing selenium tests for GREG publisher UI. When implementing UI > test cases, some situations we need to check whether some elements exists, > before click or make any operations on them. > Selenium provides, *driver.findElement(By.id("elemnt_id")) * > method to find any element by id. Problem is if that element is not exist > , it will return an error, saying > *org.openqa.selenium.NoSuchElementException: Unable to locate > element:{"method":"id","selector":"elemnt_id"}* > > Is there any way to check the existence of any element , without catching > the error? . > > > > > Regards > > > > -- > > > > *Lahiru J Ekanayake**Software Engineer* > Mobile : +94 (0) 77 8812629 / +94(0) 778509547 > Email : lahi...@wso2.com > WSO2, Inc.; http://wso2.com/ > lean . enterprise . middleware. > > > ___ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com <rajeenth...@wso2.com>* *M :+94770832823 * ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] [DEV][JAGGERY] Getting Empty JSON when logging(log.info)
HI Niranjan, Ya sure.I will meet you today. On Wed, Feb 3, 2016 at 9:25 AM, Niranjan Karunanandham <niran...@wso2.com> wrote: > Hi Rajeenthini, > > > On Wed, Feb 3, 2016 at 9:19 AM, Rajeenthini Satkunam <rajeenth...@wso2.com > > wrote: > >> HI All, >> >> Thank you chamara and sajith for your valuable suggestions.I have done >> the improvement in Jaggery to log the java Object. >> >> improvement >> - >> 1) >> https://github.com/wso2/jaggery/blob/master/components/script-engine/org.jaggeryjs.scriptengine/src/main/java/org/jaggeryjs/scriptengine/util/HostObjectUtil.java#L78 >> >> Added new code segment as per sajith's suggestion >> >> try{ >> return (new ObjectMapper().writeValueAsString(obj)); >> }catch (Exception e){ >> log.debug("Object " + obj.toString() + " of class " + obj.getClass() + " >> cannot be converted to JSON"); >> } >> >> return "{}"; >> >> >> 2) https://github.com/wso2/jaggery/blob/master/pom.xml >> >> Added maven dependencies for Jackson data-bind and annotations >> >> >> com.fasterxml.jackson.core >> jackson-annotations >> ${jackson.version} >> >> >> com.fasterxml.jackson.core >> jackson-databind >> ${jackson.version} >> >> >> 3) >> https://github.com/wso2/jaggery/blob/master/components/script-engine/org.jaggeryjs.scriptengine/pom.xml >> >> Added maven dependencies for Jackson data-bind and annotations >> >> >> I have tried to build(mvn clean install) Jaggery and product-Jaggery >> respectively.I can build Jaggery successfully But It has failed when >> building product Jaggery at Jaggery - Profile Generation. >> >> As per offline discussion with Niranjan I have added >> and <*dependency*> for Jackson data-bind and annotation in POM.xml[ >> https://github.com/wso2/jaggery/blob/master/features/org.jaggeryjs.server.feature/pom.xml] >> file as below. >> >> com.fasterxml.jackson.core:jackson-databind >> com.fasterxml.jackson.core:jackson-annotations >> >> >> >> com.fasterxml.jackson.core >> jackson-databind >> >> >> com.fasterxml.jackson.core >> jackson-annotations >> >> >> >> But Still I am getting product Jaggery build fail at the point Jaggery - >> Profile Generation,following error can be observe in the command line. >> >> >> Installation failed.Cannot complete the install because one or more required >> items could not be found. >> >> Software being installed: uuid Module - Feature 1.4.3 >> (org.jaggeryjs.modules.uuid.feature.group 1.4.3) >> Missing requirement: jackson-databind 2.0.0 (jackson-databind 2.0.0) >> requires 'package com.fasterxml.jackson.core [2.0.0,3.0.0)' but it could not >> be found >> Cannot satisfy dependency: >> From: org.jaggeryjs.modules.uuid 1.4.3 (org.jaggeryjs.modules.uuid 1.4.3) >> To: package org.jaggeryjs.scriptengine.exceptions [0.11.0,1.0.0) >> Cannot satisfy dependency: >> >> From: uuid Module - Feature 1.4.3 >> (org.jaggeryjs.modules.uuid.feature.group 1.4.3) >> To: org.jaggeryjs.modules.uuid [1.4.3] >> Cannot satisfy dependency: >> From: org.jaggeryjs.scriptengine 0.12.1.SNAPSHOT >> (org.jaggeryjs.scriptengine 0.12.1.SNAPSHOT) >> To: package com.fasterxml.jackson.databind [2.0.0,3.0.0) >> Application failed, log file location: >> /home/rajee/.m2/repository/org/eclipse/tycho/tycho-p2-runtime/0.13.0/eclipse/configuration/1454469448601.log >> >> >> Can anyone help me to figure out the cause of build fail.Hope I have >> included all the steps I have followed.Your help would be appreciated. >> >> As per the error, the build is failing because jackson-databind requires > com.fasterxml.jackson.core within the range 2.0.0 and 3.0.0. If this is > required by the feature then you need to bundle it in the feature. Shall we > have a look at this today? > >> >> >> >> On Tue, Feb 2, 2016 at 10:23 AM, Rajeenthini Satkunam < >> rajeenth...@wso2.com> wrote: >> >>> Hi sajith, >>> >>> Noted and thank you for the suggestions. >>> >>> On Mon, Feb 1, 2016 at 11:53 PM, Sajith Ariyarathna <sajit...@wso2.com> >>> wrote: >>> >>>> Hi Rajeenthini, >>>> >>>> You are hoping to add the following code snippet to the serializeJSON >>>> method [1] of the o
Re: [Dev] [DEV][JAGGERY] Getting Empty JSON when logging(log.info)
HI all, The issue was solved by adding for jackson-databind,jackson-annotations,jackson-core for POM[1] . By the Way I would like to discuss more regarding this mail. *Issue I am trying to solve* - I am getting empty JSON string ("{}") when logging Java object. - Empty JSON string("{}") will give wrong information to user. *Proposed solution* - give the user proper understandable log message. - the logging need to be fast and summarized. So I am planning to log in-case of Java object as below without logging whole object. { "javaObject" : true, "hashCode" : "39d92a", "class" : "org.wso2.apim.StoreHostObject"} You can find these links[2][3] as resources to get an idea. [1] - https://github.com/wso2/jaggery/blob/master/features/org.jaggeryjs.server.feature/pom.xml [2] - https://github.com/wso2/jaggery/blob/master/components/hostobjects/org.jaggeryjs.hostobjects.log/src/main/java/org/jaggeryjs/hostobjects/log/LogHostObject.java [3] - https://github.com/wso2/jaggery/blob/master/components/script-engine/org.jaggeryjs.scriptengine/src/main/java/org/jaggeryjs/scriptengine/util/HostObjectUtil.java On Wed, Feb 3, 2016 at 10:27 AM, Rajeenthini Satkunam <rajeenth...@wso2.com> wrote: > HI Niranjan, > > Ya sure.I will meet you today. > > On Wed, Feb 3, 2016 at 9:25 AM, Niranjan Karunanandham <niran...@wso2.com> > wrote: > >> Hi Rajeenthini, >> >> >> On Wed, Feb 3, 2016 at 9:19 AM, Rajeenthini Satkunam < >> rajeenth...@wso2.com> wrote: >> >>> HI All, >>> >>> Thank you chamara and sajith for your valuable suggestions.I have done >>> the improvement in Jaggery to log the java Object. >>> >>> improvement >>> - >>> 1) >>> https://github.com/wso2/jaggery/blob/master/components/script-engine/org.jaggeryjs.scriptengine/src/main/java/org/jaggeryjs/scriptengine/util/HostObjectUtil.java#L78 >>> >>> Added new code segment as per sajith's suggestion >>> >>> try{ >>> return (new ObjectMapper().writeValueAsString(obj)); >>> }catch (Exception e){ >>> log.debug("Object " + obj.toString() + " of class " + obj.getClass() + >>> " cannot be converted to JSON"); >>> } >>> >>> return "{}"; >>> >>> >>> 2) https://github.com/wso2/jaggery/blob/master/pom.xml >>> >>> Added maven dependencies for Jackson data-bind and annotations >>> >>> >>> com.fasterxml.jackson.core >>> jackson-annotations >>> ${jackson.version} >>> >>> >>> com.fasterxml.jackson.core >>> jackson-databind >>> ${jackson.version} >>> >>> >>> 3) >>> https://github.com/wso2/jaggery/blob/master/components/script-engine/org.jaggeryjs.scriptengine/pom.xml >>> >>> Added maven dependencies for Jackson data-bind and annotations >>> >>> >>> I have tried to build(mvn clean install) Jaggery and product-Jaggery >>> respectively.I can build Jaggery successfully But It has failed when >>> building product Jaggery at Jaggery - Profile Generation. >>> >>> As per offline discussion with Niranjan I have added >>> and <*dependency*> for Jackson data-bind and annotation in POM.xml[ >>> https://github.com/wso2/jaggery/blob/master/features/org.jaggeryjs.server.feature/pom.xml] >>> file as below. >>> >>> com.fasterxml.jackson.core:jackson-databind >>> com.fasterxml.jackson.core:jackson-annotations >>> >>> >>> >>> com.fasterxml.jackson.core >>> jackson-databind >>> >>> >>> com.fasterxml.jackson.core >>> jackson-annotations >>> >>> >>> >>> But Still I am getting product Jaggery build fail at the point Jaggery - >>> Profile Generation,following error can be observe in the command line. >>> >>> >>> Installation failed.Cannot complete the install because one or more >>> required items could not be found. >>> >>> Software being installed: uuid Module - Feature 1.4.3 >>> (org.jaggeryjs.modules.uuid.feature.group 1.4.3) >>> Missing requirement: jackson-databind 2.0.0 (jackson-databind 2.0.0) >>> requires 'package com.fasterxml.jackson.core [2.0.0,3.0.0)' but it could >>> not be found >>> Cannot satisfy dependency: >>> From: org.jaggeryjs.modules.uuid 1.4.3 (org.jaggeryjs.modules.uuid 1.4.3) >>> T
Re: [Dev] [DEV][JAGGERY] Getting Empty JSON when logging(log.info)
HI All, Thank you chamara and sajith for your valuable suggestions.I have done the improvement in Jaggery to log the java Object. improvement - 1) https://github.com/wso2/jaggery/blob/master/components/script-engine/org.jaggeryjs.scriptengine/src/main/java/org/jaggeryjs/scriptengine/util/HostObjectUtil.java#L78 Added new code segment as per sajith's suggestion try{ return (new ObjectMapper().writeValueAsString(obj)); }catch (Exception e){ log.debug("Object " + obj.toString() + " of class " + obj.getClass() + " cannot be converted to JSON"); } return "{}"; 2) https://github.com/wso2/jaggery/blob/master/pom.xml Added maven dependencies for Jackson data-bind and annotations com.fasterxml.jackson.core jackson-annotations ${jackson.version} com.fasterxml.jackson.core jackson-databind ${jackson.version} 3) https://github.com/wso2/jaggery/blob/master/components/script-engine/org.jaggeryjs.scriptengine/pom.xml Added maven dependencies for Jackson data-bind and annotations I have tried to build(mvn clean install) Jaggery and product-Jaggery respectively.I can build Jaggery successfully But It has failed when building product Jaggery at Jaggery - Profile Generation. As per offline discussion with Niranjan I have added and < *dependency*> for Jackson data-bind and annotation in POM.xml[ https://github.com/wso2/jaggery/blob/master/features/org.jaggeryjs.server.feature/pom.xml] file as below. com.fasterxml.jackson.core:jackson-databind com.fasterxml.jackson.core:jackson-annotations com.fasterxml.jackson.core jackson-databind com.fasterxml.jackson.core jackson-annotations But Still I am getting product Jaggery build fail at the point Jaggery - Profile Generation,following error can be observe in the command line. Installation failed.Cannot complete the install because one or more required items could not be found. Software being installed: uuid Module - Feature 1.4.3 (org.jaggeryjs.modules.uuid.feature.group 1.4.3) Missing requirement: jackson-databind 2.0.0 (jackson-databind 2.0.0) requires 'package com.fasterxml.jackson.core [2.0.0,3.0.0)' but it could not be found Cannot satisfy dependency: From: org.jaggeryjs.modules.uuid 1.4.3 (org.jaggeryjs.modules.uuid 1.4.3) To: package org.jaggeryjs.scriptengine.exceptions [0.11.0,1.0.0) Cannot satisfy dependency: From: uuid Module - Feature 1.4.3 (org.jaggeryjs.modules.uuid.feature.group 1.4.3) To: org.jaggeryjs.modules.uuid [1.4.3] Cannot satisfy dependency: From: org.jaggeryjs.scriptengine 0.12.1.SNAPSHOT (org.jaggeryjs.scriptengine 0.12.1.SNAPSHOT) To: package com.fasterxml.jackson.databind [2.0.0,3.0.0) Application failed, log file location: /home/rajee/.m2/repository/org/eclipse/tycho/tycho-p2-runtime/0.13.0/eclipse/configuration/1454469448601.log Can anyone help me to figure out the cause of build fail.Hope I have included all the steps I have followed.Your help would be appreciated. On Tue, Feb 2, 2016 at 10:23 AM, Rajeenthini Satkunam <rajeenth...@wso2.com> wrote: > Hi sajith, > > Noted and thank you for the suggestions. > > On Mon, Feb 1, 2016 at 11:53 PM, Sajith Ariyarathna <sajit...@wso2.com> > wrote: > >> Hi Rajeenthini, >> >> You are hoping to add the following code snippet to the serializeJSON >> method [1] of the org.jaggeryjs.scriptengine.util.HostObjectUtil class. >> >>> String JsonString = null; >>> try{ >>> ObjectMapper mapper = new ObjectMapper(); >>> JsonString = mapper.writeValueAsString(obj); >>> }catch (Exception e){ >>> System.out.println(e.getMessage()); >>> } >>> >>> return "{\"javaObject\":\"true\",\"object\":\"" + JsonString + "\"}"; >>> >>> There are few issue in this code snippet. >> >>- Don't catch generic Exception, always catch a specific exception. >>In here you should catch JsonProcessingException [2]. >>- Don't use System.out.println to log exceptions. Instead use a >>proper logger. HostObjectUtil class has a log object defined in line >>30 [3], you can use that. >>- Returning '{"javaObject": "true", "object": "{ ... }"}' string >>gives a wrong impression that there are two attributes called 'javaObject' >>& 'object' in the logged object. I think just returning the JSON string >>will be enough. >> >> After corrections (I also took the liberty to reduce no of lines): >> >> try { >> >> return (new ObjectMapper()).writeValueAsString(obj); >> >> } catch (JsonProcessingException e) { >> >> log.debug("Object
Re: [Dev] [DEV][JAGGERY] Getting Empty JSON when logging(log.info)
Hi sajith, Noted and thank you for the suggestions. On Mon, Feb 1, 2016 at 11:53 PM, Sajith Ariyarathna <sajit...@wso2.com> wrote: > Hi Rajeenthini, > > You are hoping to add the following code snippet to the serializeJSON > method [1] of the org.jaggeryjs.scriptengine.util.HostObjectUtil class. > >> String JsonString = null; >> try{ >> ObjectMapper mapper = new ObjectMapper(); >> JsonString = mapper.writeValueAsString(obj); >> }catch (Exception e){ >> System.out.println(e.getMessage()); >> } >> >> return "{\"javaObject\":\"true\",\"object\":\"" + JsonString + "\"}"; >> >> There are few issue in this code snippet. > >- Don't catch generic Exception, always catch a specific exception. In >here you should catch JsonProcessingException [2]. >- Don't use System.out.println to log exceptions. Instead use a proper >logger. HostObjectUtil class has a log object defined in line 30 [3], >you can use that. >- Returning '{"javaObject": "true", "object": "{ ... }"}' string gives >a wrong impression that there are two attributes called 'javaObject' & >'object' in the logged object. I think just returning the JSON string will >be enough. > > After corrections (I also took the liberty to reduce no of lines): > > try { > > return (new ObjectMapper()).writeValueAsString(obj); > > } catch (JsonProcessingException e) { > > log.debug("Object " + obj.toString() + " of class " + obj.getClassName() + > " cannot be converted to JSON"); > > } > > return "{}"; > > > [1] > https://github.com/wso2/jaggery/blob/master/components/script-engine/org.jaggeryjs.scriptengine/src/main/java/org/jaggeryjs/scriptengine/util/HostObjectUtil.java#L78 > [2] > https://static.javadoc.io/com.fasterxml.jackson.core/jackson-databind/2.6.3/com/fasterxml/jackson/databind/ObjectMapper.html#writeValueAsString(java.lang.Object) > [3] > https://github.com/wso2/jaggery/blob/master/components/script-engine/org.jaggeryjs.scriptengine/src/main/java/org/jaggeryjs/scriptengine/util/HostObjectUtil.java#L30 > > Thanks. > > > On Mon, Feb 1, 2016 at 8:13 PM, Rajeenthini Satkunam <rajeenth...@wso2.com > > wrote: > >> Hi sajith, >> >> i have added this Student class for example.As for current implementation >> goes like this way in Jaggery below. >> >> public static String serializeJSON(Object obj) { >> if (obj instanceof Wrapper) { >> obj = ((Wrapper) obj).unwrap(); >> } >> if (obj == null) { >> return "null"; >> } >> if (obj instanceof Undefined) { >> return "null"; >> } >> if (obj instanceof Boolean) { >> return Boolean.toString((Boolean) obj); >> } >> if (obj instanceof String) { >> return serializeString((String) obj); >> } >> if (obj instanceof ConsString) { >> return serializeString(obj.toString()); >> } >> if (obj instanceof Number) { >> return obj.toString(); >> } >> if (obj instanceof XMLObject) { >> return serializeString(serializeXML((ScriptableObject) obj)); >> } >> if (obj instanceof NativeObject) { >> return serializeNativeObject((NativeObject) obj); >> } >> if (obj instanceof NativeArray) { >> return serializeNativeArray((NativeArray) obj); >> } >> if (obj instanceof Object[]) { >> return serializeObjectArray((Object[]) obj); >> } >> if (obj instanceof Scriptable) { >> Scriptable object = (Scriptable) obj; >> String jsClass = object.getClassName(); >> if ("Date".equals(jsClass)) { >> return serializeString(serializeNativeDate(object)); >> } else if ("Error".equals(jsClass)) { >> return serializeString(serializeNativeError(object)); >> } >> } >> String JsonString = null; >> try{ >> ObjectMapper mapper = new ObjectMapper(); >> JsonString = mapper.writeValueAsString(obj); >> }catch (Exception e){ >> System.out.println(e.getMessage()); >> } >> >> return "{\"javaObject\":\"true\",\"object\":\"" + JsonString + "\"}"; >> } >> >> AFAIU since we are parsing Object type of argument It i
Re: [Dev] [DEV][JAGGERY] Getting Empty JSON when logging(log.info)
Hi sajith, i have added this Student class for example.As for current implementation goes like this way in Jaggery below. public static String serializeJSON(Object obj) { if (obj instanceof Wrapper) { obj = ((Wrapper) obj).unwrap(); } if (obj == null) { return "null"; } if (obj instanceof Undefined) { return "null"; } if (obj instanceof Boolean) { return Boolean.toString((Boolean) obj); } if (obj instanceof String) { return serializeString((String) obj); } if (obj instanceof ConsString) { return serializeString(obj.toString()); } if (obj instanceof Number) { return obj.toString(); } if (obj instanceof XMLObject) { return serializeString(serializeXML((ScriptableObject) obj)); } if (obj instanceof NativeObject) { return serializeNativeObject((NativeObject) obj); } if (obj instanceof NativeArray) { return serializeNativeArray((NativeArray) obj); } if (obj instanceof Object[]) { return serializeObjectArray((Object[]) obj); } if (obj instanceof Scriptable) { Scriptable object = (Scriptable) obj; String jsClass = object.getClassName(); if ("Date".equals(jsClass)) { return serializeString(serializeNativeDate(object)); } else if ("Error".equals(jsClass)) { return serializeString(serializeNativeError(object)); } } String JsonString = null; try{ ObjectMapper mapper = new ObjectMapper(); JsonString = mapper.writeValueAsString(obj); }catch (Exception e){ System.out.println(e.getMessage()); } return "{\"javaObject\":\"true\",\"object\":\"" + JsonString + "\"}"; } AFAIU since we are parsing Object type of argument It is better we can use ObjectMapper.Correct me If I am wrong.Your suggestion would be more appreciated. On Sun, Jan 31, 2016 at 10:23 AM, Sajith Ariyarathna <sajit...@wso2.com> wrote: > Hi Rajeenthini, > > AFAIK ability to convert a POJO into JSON object does nor affect the > output of a Jaggery Log of that POJO. > To get a proper log output for a Java object, you need to implement the > "toString" method in that Java class. For example in your case, > > public class Student { > > ... > > public String toString() { > > return "{name: " + this.name + ", age: " + this.age + ", indexNo: " + > this.indexNo + "}"; > > } > > } > > Now you can log a Student object in your Jaggery code as following. > > log.info(studentObj.toString()); > > > Thanks. > > > > On Sat, Jan 30, 2016 at 9:28 PM, Rajeenthini Satkunam < > rajeenth...@wso2.com> wrote: > >> Hi, >> >> I have worked on writing Jaggery test for Jaggery-Product.I can observe >> when we tried to log the object it always gives us empty JSON >> ({}).Currently the implementation goes this way when we try to log java >> object. >> >> So I was trying to get rid of this observed behavior of Jaggery.I have >> gone through a solution. >> >> *using Jackson[1] * >> >> We can convert java object to JSON[2] and can log it. >> >> I have shared the piece of code I have tried out with Jackson below. >> >> *Simple POJO Student class* >> >> public class Student { >> private int age; >> private String name; >> private String indexNo; >> >> public int getAge() { >> return age; >> } >> >> public void setAge(int age) { >> this.age = age; >> } >> >> public String getName() { >> return name; >> } >> >> public void setName(String name) { >> this.name = name; >> } >> >> public String getIndexNo() { >> return indexNo; >> } >> >> public void setIndexNo(String indexNo) { >> this.indexNo = indexNo; >> } >> } >> >> *Simple class to test Jackson* >> >> import com.fasterxml.jackson.databind.ObjectMapper; >> import util.Student; >> public class MyTest { >> public static void main(String args[]){ >> Student st = new Student(); >> st.setIndexNo("DS001"); >> st.setAge(12); >> st.setName("kareena"); >> try{ >> ObjectMapper mapper = new ObjectMapper(); >> String jsonInString = mapper.writeValueAsString(st); >> >> System.out.println("*
[Dev] [DEV][JAGGERY] Getting Empty JSON when logging(log.info)
Hi, I have worked on writing Jaggery test for Jaggery-Product.I can observe when we tried to log the object it always gives us empty JSON ({}).Currently the implementation goes this way when we try to log java object. So I was trying to get rid of this observed behavior of Jaggery.I have gone through a solution. *using Jackson[1] * We can convert java object to JSON[2] and can log it. I have shared the piece of code I have tried out with Jackson below. *Simple POJO Student class* public class Student { private int age; private String name; private String indexNo; public int getAge() { return age; } public void setAge(int age) { this.age = age; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getIndexNo() { return indexNo; } public void setIndexNo(String indexNo) { this.indexNo = indexNo; } } *Simple class to test Jackson* import com.fasterxml.jackson.databind.ObjectMapper; import util.Student; public class MyTest { public static void main(String args[]){ Student st = new Student(); st.setIndexNo("DS001"); st.setAge(12); st.setName("kareena"); try{ ObjectMapper mapper = new ObjectMapper(); String jsonInString = mapper.writeValueAsString(st); System.out.println(""); System.out.println(jsonInString); System.out.println(""); }catch(Exception e){ System.out.print("Exception caught "+ e); } } } Actual output by above code. {"age":12,"name":"kareena","indexNo":"DS001"} I have added a dependency in the POM.xml com.fasterxml.jackson.core jackson-databind 2.6.3 IMHO we can use the same scenario in case of log JAVA object.Your help and suggestions are more appreciated and guide me if I am wrong or I can have better solution than this. [1] - https://github.com/FasterXML/jackson-databind [2] - http://www.mkyong.com/java/how-to-convert-java-object-to-from-json-jackson/ -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com <rajeenth...@wso2.com>* *M :+94770832823 * ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
[Dev] [Support-Dev][DEV][MB] Getting error when running script
Hi, I have followed the documentation[ https://docs.wso2.com/display/MB300/Configuring+MySQL] of MB 3.0.0 to configure mysql for MB.I have done with step 1 and step 2 successfully and when I am trying to do a step 3,I got a error when running the script that has given in the documentation as below. script :- mysql -u WSO2_MB -p -Dregdb < '/dbscripts/mb-store/mysql-mb.sql '; As per my understanding WSO2_MB should be a mysql username(for example "root") and -Dregdb should be a database name which has created in the step 1 as WSO2_MB. I have run the script with changes I have mentioned above as below. mysql -u root -p -DWSO2_MB < '/home/rajee/Documents/SupportMine/StackOverflow/wso2mb-3.0.0/dbscripts/mb-store/mysql-mb.sql'; And I can observe the tables are created successfully.IMHO we need to update the documentation of MB 3.0.0. -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com <rajeenth...@wso2.com>* *M :+94770832823 * ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] [DS][DAS] Sample for DashboardServer - How to get back-end url, username, password for DAS to invoke DAS rest API from jaggery file
Hi all, Since it is a sample I am configuring this credentials with analytics.json under folder of /carbon-dashboards/apps/portal/configs and getting username,password and url by json file. { "url" :"https://localhost:9465/analytics/search;, "username" : "admin", "password" : "admin" } Thank you for prompt replies. On Fri, Dec 18, 2015 at 2:38 PM, Isuru Wijesinghe <isur...@wso2.com> wrote: > Hi Rajeenthini, > > Can't you hold a configuration file at the back-end side for this ?? Here > what I mean is something similar to below example. In the url tag you > should have to keep the base url of the DAS. The rest of the part of the > url u can append from the code. (Please note that if you keep a property > file like below, you should have to add secure vault also. It is used to > secure plain text password which is contains in configuration files of > WSO2 products). And then you can read it from your jaggery code . (see > http://jaggeryjs.org/documentation.jag?api=file) > eg: > > http://wso2.org/pc/config;> > > https://localhost:9445/ > admin > admin > > > > > On Fri, Dec 18, 2015 at 12:33 PM, Supun Sethunga <sup...@wso2.com> wrote: > >> Hi Rajeenthini, >> >> Instead of the DAS REST API, you can use the "Analytics javascript API" >> [1]. This should eliminate the requirement of needing user-credentials. (or >> doesn't need to send an Authorization header) >> >> [1] https://docs.wso2.com/display/DAS300/Analytics+JavaScript+(JS)+API >> >> Regards, >> Supun >> >> On Fri, Dec 18, 2015 at 10:41 AM, Rajeenthini Satkunam < >> rajeenth...@wso2.com> wrote: >> >>> Hi all, >>> >>> Currently I am working on creating sample for dashboard server with DAS >>> integration.I need to invoke DAS rest API from Jaggery file(sample.jag) to >>> get some data.As per documentation[1] of DAS rest API we need to send >>> authorization header along with request to fetch data from DAS. So for >>> workaround I have hard-coded the username password values to variable and >>> concatenate them as username + ":" + password and encoded them then send as >>> a authorization header.Here I need to get server username and >>> password(credentials).IMHO it is not good practice that hard-coding >>> credentials of server. >>> I have shared my Jaggery code below >>> >>> try { >>> var username = "admin";//hard-coded value of username >>> var password = "admin";//hard-coded value of password >>> var tableName = request.getParameter("tableName"); >>> var query = request.getParameter("query"); >>> var url = "https://localhost:9465/analytics/search;; >>> var encoderJavaPkg = Packages.javax.xml.bind.DatatypeConverter; >>> var bytes = []; >>> var encodeString = username + ":" + password; >>> for (var i = 0; i < encodeString.length; ++i) { >>> bytes.push(encodeString.charCodeAt(i)); >>> } >>> var authHeader = "Basic " + encoderJavaPkg.printBase64Binary(bytes); >>> var result = post(url, stringify({ >>> "tableName": tableName, >>> "start": 0, >>> "count": 100, >>> "query": query >>> }), {"Authorization": authHeader, "Content-Type": "application/json"}, >>> "application/json"); >>> print(result.data); >>> } catch (e) { >>> log.info(e); >>> } >>> >>> [1] - >>> https://docs.wso2.com/display/DAS300/Retrieving+All+Records+Matching+the+Given+Search+Query+via+REST+API >>> >>> As for now to start both server (DAS and DS) I have changed offset value >>> for DAS as "2" in carbon.xml.I can successfully start both server >>> simultaneously.It will be very useful if I can get the back-end URL and >>> server credentials of DAS and get rid of hard-coding those values.Can >>> anyone please help me and your suggestions mostly appreciate? >>> >>> >>> >>> >>> -- >>> >>> *Thank You.* >>> >>> *Rajeenthini Satkunam* >>> >>> *Associate Software Engineer | WSO2* >>> >>> >>> *E:rajeenth...@wso2.com <rajeenth...@wso2.com>* >>> >>> *M :+94770832823 <%2B94770832823> * >>> >>> >>> ___ >>> Dev mailing list >>> Dev@wso2.org >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> >> >> -- >> *Supun Sethunga* >> Software Engineer >> WSO2, Inc. >> http://wso2.com/ >> lean | enterprise | middleware >> Mobile : +94 716546324 >> >> ___ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Isuru Wijesinghe > *Software Engineer* > WSO2 inc : http://wso2.com > lean.enterprise.middleware > Mobile: 0710933706 > isur...@wso2.com > -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com <rajeenth...@wso2.com>* *M :+94770832823 * ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
[Dev] [DS][DAS] Sample for DashboardServer - How to get back-end url, username, password for DAS to invoke DAS rest API from jaggery file
Hi all, Currently I am working on creating sample for dashboard server with DAS integration.I need to invoke DAS rest API from Jaggery file(sample.jag) to get some data.As per documentation[1] of DAS rest API we need to send authorization header along with request to fetch data from DAS. So for workaround I have hard-coded the username password values to variable and concatenate them as username + ":" + password and encoded them then send as a authorization header.Here I need to get server username and password(credentials).IMHO it is not good practice that hard-coding credentials of server. I have shared my Jaggery code below try { var username = "admin";//hard-coded value of username var password = "admin";//hard-coded value of password var tableName = request.getParameter("tableName"); var query = request.getParameter("query"); var url = "https://localhost:9465/analytics/search;; var encoderJavaPkg = Packages.javax.xml.bind.DatatypeConverter; var bytes = []; var encodeString = username + ":" + password; for (var i = 0; i < encodeString.length; ++i) { bytes.push(encodeString.charCodeAt(i)); } var authHeader = "Basic " + encoderJavaPkg.printBase64Binary(bytes); var result = post(url, stringify({ "tableName": tableName, "start": 0, "count": 100, "query": query }), {"Authorization": authHeader, "Content-Type": "application/json"}, "application/json"); print(result.data); } catch (e) { log.info(e); } [1] - https://docs.wso2.com/display/DAS300/Retrieving+All+Records+Matching+the+Given+Search+Query+via+REST+API As for now to start both server (DAS and DS) I have changed offset value for DAS as "2" in carbon.xml.I can successfully start both server simultaneously.It will be very useful if I can get the back-end URL and server credentials of DAS and get rid of hard-coding those values.Can anyone please help me and your suggestions mostly appreciate? -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com <rajeenth...@wso2.com>* *M :+94770832823 <%2B94770832823> * ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Difference between driver.close() and driver.quit()
Adding [ wso2Dev,Krishantha,Nuwan,Irham ] Hi nipuna, IMHO driver.quit() will make sure that we properly terminates the test class and quit all the driver instance and running the the next test class with a new instance of driver. On Fri, Dec 11, 2015 at 5:30 PM, Nipuna Chandradasa <nipu...@wso2.com> wrote: > Hi rajeenthini > > If this is the case why don't we close the opened extra browser windows > within each test. If we do this we will end up having one browser window at > the end of the test case > > I will look in to this as I refactoring the braking tests. > > Regards > On 11 Dec 2015 5:13 p.m., "Rajeenthini Satkunam" <rajeenth...@wso2.com> > wrote: > >> Hi all, >> >> I have search through the web above $subject.The way I understand is we >> can refine our test code since we are handle multiple browser window or >> single browser window.If we are handle one and only one window we don't >> need to explicitly do driver.quit() , But In case of multiple windows we >> should use driver.quit() because driver.close will close only the window it >> has focused. >> >> Please find references. >> [1] - http://www.testingdiaries.com/driver-close-and-driver-quit/ >> [2] - https://www.youtube.com/watch?v=3vxBBlvxcKE >> >> Correct me if I am wrong. >> >> -- >> >> *Thank You.* >> >> *Rajeenthini Satkunam* >> >> *Associate Software Engineer | WSO2* >> >> >> *E:rajeenth...@wso2.com <rajeenth...@wso2.com>* >> >> *M :+94770832823 <%2B94770832823> * >> >> -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com <rajeenth...@wso2.com>* *M :+94770832823 * ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
[Dev] [DAS][Documentation] Incorrect documentation - Retrieving the Total Record Count of a Table via REST API DAS
Hi all, I have tried to invoke REST API through POSTMAN(Chrome) for DAS getting the record count of a table.I have followed the documentation here[ https://docs.wso2.com/display/DAS300/Retrieving+the+Total+Record+Count+of+a+Table+via+REST+API] .It gives me a 200 OK success response but it always returns -1 as a response. But I have tried this below way and it is working fine for me.Hope the DAS documentation of REST API wants to be update along with API changes. *METHOD* : POST *URL* : https://localhost:9443/analytics/search_count *BODY* : { "tableName":"sample2" } *HEADERS* : Authorization : Basic YWRtaW46YWRtaW4= Content-Type : application/json This REST API request gives me 200 OK success response as a count of records in a particular table. I have inserted the screenshot of my POSTMAN request and response for further more idea. -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com <rajeenth...@wso2.com>* *M :+94770832823 * ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] [DAS][Documentation] Incorrect documentation - Retrieving the Total Record Count of a Table via REST API DAS
Hi, Noted. IMHO it is good if we mention above concern in the document in that particular place. On Fri, Dec 11, 2015 at 10:40 AM, Anjana Fernando <anj...@wso2.com> wrote: > Also, search count always work, because it is the indexing based search > count, and that will always return the count. > > Cheers, > Anjana. > > On Fri, Dec 11, 2015 at 10:39 AM, Anjana Fernando <anj...@wso2.com> wrote: > >> Hi, >> >> Getting the record count from direct analytics tables are disabled by >> default from the RDBMS connector. This is basically an optional >> functionality, and when that happens, it will return -1. @Rukshani, please >> mention this properly in the docs. I remember this issue was raised earlier >> also, and maybe we mentioned it in some other place in the docs. >> >> Cheers, >> Anjana. >> >> On Fri, Dec 11, 2015 at 8:14 AM, Rukshani Weerasinha <ruksh...@wso2.com> >> wrote: >> >>> Hi all, >>> >>> Thank you for reporting this. I will update this thread once the >>> documentation is fixed. >>> >>> Best Regards, >>> Rukshani. >>> >>> On Thu, Dec 10, 2015 at 6:42 PM, Rajeenthini Satkunam < >>> rajeenth...@wso2.com> wrote: >>> >>>> Hi all, >>>> >>>> I have tried to invoke REST API through POSTMAN(Chrome) for DAS getting >>>> the record count of a table.I have followed the documentation here[ >>>> https://docs.wso2.com/display/DAS300/Retrieving+the+Total+Record+Count+of+a+Table+via+REST+API] >>>> .It gives me a 200 OK success response but it always returns -1 as a >>>> response. >>>> >>>> >>>> >>>> But I have tried this below way and it is working fine for me.Hope the >>>> DAS documentation of REST API wants to be update along with API changes. >>>> >>>> *METHOD* : POST >>>> >>>> *URL* : https://localhost:9443/analytics/search_count >>>> >>>> *BODY* : >>>> { >>>> "tableName":"sample2" >>>> } >>>> >>>> *HEADERS* : >>>> Authorization : Basic YWRtaW46YWRtaW4= >>>> Content-Type : application/json >>>> >>>> This REST API request gives me 200 OK success response as a count of >>>> records in a particular table. I have inserted the screenshot of my POSTMAN >>>> request and response for further more idea. >>>> >>>> >>>> >>>> >>>> -- >>>> >>>> *Thank You.* >>>> >>>> *Rajeenthini Satkunam* >>>> >>>> *Associate Software Engineer | WSO2* >>>> >>>> >>>> *E:rajeenth...@wso2.com <rajeenth...@wso2.com>* >>>> >>>> *M :+94770832823 <%2B94770832823> * >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "WSO2 Documentation Group" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to documentation+unsubscr...@wso2.com. >>>> For more options, visit https://groups.google.com/a/wso2.com/d/optout. >>>> >>> >>> >>> >>> -- >>> Rukshani Weerasinha >>> >>> WSO2 Inc. >>> Web:http://wso2.com >>> Mobile: 0777 683 738 >>> >>> >> >> >> -- >> *Anjana Fernando* >> Senior Technical Lead >> WSO2 Inc. | http://wso2.com >> lean . enterprise . middleware >> > > > > -- > *Anjana Fernando* > Senior Technical Lead > WSO2 Inc. | http://wso2.com > lean . enterprise . middleware > -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com <rajeenth...@wso2.com>* *M :+94770832823 * ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] WSO2 Committers += Kesavan Yogarajah
Congratulations Kesavan On Fri, Nov 27, 2015 at 3:04 PM, Kalyani Yogeswaranathan <kaly...@wso2.com> wrote: > Congrats Kesavan!!! > > On Fri, Nov 27, 2015 at 12:02 PM, Malaka Silva <mal...@wso2.com> wrote: > >> Hi Devs, >> >> Its my pleasure to welcome Kesavan Yogarajah as a WSO2 Committer. >> >> Kesavan has been working with the WSO2 Connectors team and has >> contributed immensely to ESB product on RnD, IS Authenticators and ESB >> Connectors. He is a very dedicated and committed individual who is eager >> to learn. >> >> Kesavan, welcome aboard and keep up the good work. >> >> Best Regards, >> >> Malaka Silva >> Senior Tech Lead >> M: +94 777 219 791 >> Tel : 94 11 214 5345 >> Fax :94 11 2145300 >> Skype : malaka.sampath.silva >> LinkedIn : http://www.linkedin.com/pub/malaka-silva/6/33/77 >> Blog : http://mrmalakasilva.blogspot.com/ >> >> WSO2, Inc. >> lean . enterprise . middleware >> http://www.wso2.com/ >> http://www.wso2.com/about/team/malaka-silva/ >> <http://wso2.com/about/team/malaka-silva/> >> https://store.wso2.com/store/ >> >> Save a tree -Conserve nature & Save the world for your future. Print this >> email only if it is absolutely necessary. >> >> ___ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > > *Kalyani Yogeswaranathan* > > *Associate software engineer* > *WSO2 Inc.* > > *Mobile: 0776390284* > > ___ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com <rajeenth...@wso2.com>* *M :+94770832823 * ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Fix for Lifecycle Action[promote/demote] is not properly works in Enterprise Store
Adding waruna. On Thu, Nov 19, 2015 at 2:15 PM, Rajeenthini Satkunam <rajeenth...@wso2.com> wrote: > Hi All, > > I have fixed this issue [1] in the Pull Request [2] .We have merged the > PR to jaggery-extensions master SNAPSHOT version now.To include this fix in > GREG, update the jaggery-extensions before next release of GREG. > > [1] - https://wso2.org/jira/browse/STORE-720 > [2] - https://github.com/wso2/jaggery-extensions/pull/31 > -- > > *Thank You.* > > *Rajeenthini Satkunam* > > *Associate Software Engineer | WSO2* > > > *E:rajeenth...@wso2.com <rajeenth...@wso2.com>* > > *M :+94770832823 <%2B94770832823> * > > -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com <rajeenth...@wso2.com>* *M :+94770832823 * ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
[Dev] Fix for Lifecycle Action[promote/demote] is not properly works in Enterprise Store
Hi All, I have fixed this issue [1] in the Pull Request [2] .We have merged the PR to jaggery-extensions master SNAPSHOT version now.To include this fix in GREG, update the jaggery-extensions before next release of GREG. [1] - https://wso2.org/jira/browse/STORE-720 [2] - https://github.com/wso2/jaggery-extensions/pull/31 -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com <rajeenth...@wso2.com>* *M :+94770832823 * ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
[Dev] [Automation][DS] Build is not getting fail since the find-bug finds bugs in the code
Hi all, I would like to integrate find-bug plugin with a maven build of product DS Integration test module(Dashboard Server).So I have added the plugin maven find-bug under plugins in POM of integration module of product DS. Here is the code I have added in POM. org.codehaus.mojo findbugs-maven-plugin Max Low true ${project.build.directory}/findbugs true true analyze-compile verify check But the build is not getting fail even I got some bugs through find-bug tool.I can produce the findbugsXml.xml file under directory findBug.Can anyone tell that do I need to add any other configurations to run this tool for test sources rather than adding this plugin to POM? I have asked this from StackOverFlow as well you can find the question here[1]. [1] - http://stackoverflow.com/questions/33796044/how-can-i-integrate-find-bug-maven-plugin-to-integration-test-module references [2] - http://gleclaire.github.io/findbugs-maven-plugin/ [3] - http://stackoverflow.com/questions/33234692/maven-findbugs-plugin-how-to-run-findbug-on-the-test-classes -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com <rajeenth...@wso2.com>* *M :+94770832823 * ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] [Automation][DS] Build is not getting fail since the find-bug finds bugs in the code
Hi chamara, I have already tried the way you have mentioned that removing testOnFailure as well as change to compile. Even when I changed the phase to compile, it does not produce findbugxml file.And I have version specification in a Parent POM as below. org.apache.maven.plugins findbugs-maven-plugin ${maven.findbugsplugin.version} 3.0.2 my current find-bug plugin in POM of test module. org.codehaus.mojo findbugs-maven-plugin Max Low true ${project.build.directory}/findbugs true analyze-compile compile check Can you please give more suggestions on this.Thanks in advance. On Fri, Nov 20, 2015 at 9:31 AM, Isuru Rupasinghe <isur...@wso2.com> wrote: > Hi Chamara, > > Released the message. > > Thanks & Regards, > > *Isuru Rupasinghe* > WSO2 Inc.; http://wso2.com > lean.enterprise.middle-ware > > mobile: +94 77 590 4545 > <%2B94%2077%20352%C2%A05930> > office: +94 11 214 5345 / +94 11 743 5800 ext: 5739 > > > On Fri, Nov 20, 2015 at 8:23 AM, Chamara Philips <chama...@wso2.com> > wrote: > >> Please release the mail. >> -- Forwarded message -- >> From: Chamara Philips <chama...@wso2.com> >> Date: Fri, Nov 20, 2015 at 8:21 AM >> Subject: Fwd: [Dev] [Automation][DS] Build is not getting fail since the >> find-bug finds bugs in the code >> To: WSO2 Developers' List <dev@wso2.org> >> >> >> >> -- Forwarded message -- >> From: Chamara Philips <chama...@wso2.com> >> Date: Fri, Nov 20, 2015 at 8:15 AM >> Subject: Re: [Dev] [Automation][DS] Build is not getting fail since the >> find-bug finds bugs in the code >> To: Rajeenthini Satkunam <rajeenth...@wso2.com> >> >> >> Hi Rajeenthini, >> >> It is not necessary to set failOnError to true, as it is default. Can you >> please try removing the "failOnError" property. Also you have missed the >> version. Following plugin declaration worked for me to run it successfully >> without integrating tests. I think adding "includeTests" should work fine >> with tests. >> >> >> >> >> org.codehaus.mojo >> findbugs-maven-plugin >> 2.5.2 >> >> >> Max >> >> Low >> >> true >> >> >> ${project.build.directory}/findbugs >> >> >> >> analyze-compile >> compile >> >> check >> >> >> >> >> >> >> >> Thanks. >> >> On Thu, Nov 19, 2015 at 2:54 PM, Rajeenthini Satkunam < >> rajeenth...@wso2.com> wrote: >> >>> Hi all, >>> >>> I would like to integrate find-bug plugin with a maven build of product >>> DS Integration test module(Dashboard Server).So I have added the plugin >>> maven find-bug under plugins in POM of integration module of product DS. >>> Here is the code I have added in POM. >>> >>> >>> org.codehaus.mojo >>> findbugs-maven-plugin >>> >>> Max >>> Low >>> true >>> >>> ${project.build.directory}/findbugs >>> true >>> true >>> >>> >>> >>> analyze-compile >>> verify >>> >>> check >>> >>> >>> >>> >>> >>> But the build is not getting fail even I got some bugs through find-bug >>> tool.I can produce the findbugsXml.xml file under directory findBug.Can >>> anyone tell that do I need to add any other configurations to run this tool >>> for test sources rather than adding this plugin to POM? >>> >>> I have asked this from StackOverFlow as well you can find the question >>> here[1]. >>> [1] - >>> http://stackoverflow.com/questions/33796044/how-can-i-integrate-find-bug-maven-plugin-to-integration-test-module >>> >>> references >>> >>> [2] - http://gleclaire.github.io/findbugs-maven-plugin/ >>> [3] - >>> http://stackoverflow.com/questions/33234692/maven-findb
Re: [Dev] [DEV][Automation] - How to automate the Drag-Drop Action in Test-case Using selenium
Hi All, I tried out what nipuna suggested.I have done small change Because using "nth child" is not good way to have in test java file.that 1) first we make all the element of class .ues-thumbnails will be draggable element 2) Then we point out the elements we need to move and the target which the element need to be drop, 3) Action drag and drop using simulate function using jquery.simulate.js $(".ues-thumbnail").draggable({ cancel: false, appendTo: 'body',// These are the options we gave when writing the draggable element. helper: 'clone', start: function (event, ui) { ui.helper.addClass('ues-store-thumbnail'); }, stop: function (event, ui) { ui.helper.removeClass('ues-store-thumbnail'); } }); var gadget = $("#g1"); var target = $("#a"); var targetOffset = target.offset(); var gadgetOffset = gadget.offset(); var dx = targetOffset.left - gadgetOffset.left; var dy = targetOffset.top - gadgetOffset.top; gadget.simulate('drag', { dx: dx, dy: dy }); Thank you @nipuna for your prompt reply and a try. On Tue, Nov 3, 2015 at 12:07 PM, Rajeenthini Satkunam <rajeenth...@wso2.com> wrote: > Hi all, > > IMHO when we calling the Javascript method directly it does not mean > actual drag and drop.So better we can try @nipuna suggestion as first > making the elements draggable and try simulate function using > jquery.simulate.js for drag and drop action,I have tried simulate earlier > but I missed to make elements draggable.So I am working on this approach :). > > On Tue, Nov 3, 2015 at 11:55 AM, Nipuna Chandradasa <nipu...@wso2.com> > wrote: > >> HI manu, >> >> I didn't try the 1st alternative that Rajeenthini mentioned ( set >> timeout for ues thumbnails to make them drag-gable to drag and drop action). >> But i tried the 2nd alternative which making createComponent() and >> findStoreCache() methods public... and it worked. >> >> But isn't it good if we did not change the code to do the tests ... ? >> Also Jquery uses their jquery.simulate.js to test there functionalities. So >> using that to test the drag and drop in our scenario is good isn't it? >> >> On Tue, Nov 3, 2015 at 11:33 AM, Rajeenthini Satkunam < >> rajeenth...@wso2.com> wrote: >> >>> Hi manu, >>> >>> I have tried with the modification done in my local checkout. >>> >>> 1) we have set timeout for ues thumbnails to make them drag-gable to >>> drag and drop action. >>> 2) we have called the javascript function { createComponent($("#a"), >>> findStoreCache("gadget", "g1")); } to crate gadget using the method >>> JavascriptExecutor >>> >>> By first approach I could not resolve the drag and drop action using >>> selenium But the second approach works fine and we have drawback that we >>> need to make two javascript function at designer.js file as global >>> functions to use the createComponent to do drag and drop Action using >>> selenium. >>> >>> As per discussion with @nipuna the only problem with our UI that only >>> those elements are draggable when mouse over.So IMHO we can make them >>> draggable and after that can do the drag and drop Action.I will go through >>> the nipuna's suggestion as well and will update the mail thread. >>> >>> >>> >>> On Tue, Nov 3, 2015 at 6:35 AM, Manuranga Perera <m...@wso2.com> wrote: >>> >>>> I also noted the on mouseenter event drag-able issue and made a local >>>> change in Rajeenthini's checkout. >>>> Rajeenthini, were you able to test it with that change? >>>> >>>> On Mon, Nov 2, 2015 at 7:16 PM, Nipuna Chandradasa <nipu...@wso2.com> >>>> wrote: >>>> >>>>> Hi Rajeenthini, >>>>> >>>>> I tried one of your references which uses jquery.simulate.js to test >>>>> the jquery UI functionality. It worked. >>>>> Only thing that it didnt work with out product is we only make the >>>>> element draggable when the mouseenter event. I progamatically made it >>>>> draggable. Then using jquery simulator i simulate the drag and drop. >>>>> >>>>> this is the link i refer ( it's 6th reference in your list :D ) >>>>> >>>>> >>>>> http://stackoverflow.com/questions/16848165/programmatically-drag-and-drop-element-onto-another-element >>>>> >>>>> Following is what i did: >>>>> >>>>> ((JavascriptExecutor)getDriver()).
Re: [Dev] [DEV][Automation] - How to automate the Drag-Drop Action in Test-case Using selenium
Hi manu, I have tried with the modification done in my local checkout. 1) we have set timeout for ues thumbnails to make them drag-gable to drag and drop action. 2) we have called the javascript function { createComponent($("#a"), findStoreCache("gadget", "g1")); } to crate gadget using the method JavascriptExecutor By first approach I could not resolve the drag and drop action using selenium But the second approach works fine and we have drawback that we need to make two javascript function at designer.js file as global functions to use the createComponent to do drag and drop Action using selenium. As per discussion with @nipuna the only problem with our UI that only those elements are draggable when mouse over.So IMHO we can make them draggable and after that can do the drag and drop Action.I will go through the nipuna's suggestion as well and will update the mail thread. On Tue, Nov 3, 2015 at 6:35 AM, Manuranga Perera <m...@wso2.com> wrote: > I also noted the on mouseenter event drag-able issue and made a local > change in Rajeenthini's checkout. > Rajeenthini, were you able to test it with that change? > > On Mon, Nov 2, 2015 at 7:16 PM, Nipuna Chandradasa <nipu...@wso2.com> > wrote: > >> Hi Rajeenthini, >> >> I tried one of your references which uses jquery.simulate.js to test the >> jquery UI functionality. It worked. >> Only thing that it didnt work with out product is we only make the >> element draggable when the mouseenter event. I progamatically made it >> draggable. Then using jquery simulator i simulate the drag and drop. >> >> this is the link i refer ( it's 6th reference in your list :D ) >> >> >> http://stackoverflow.com/questions/16848165/programmatically-drag-and-drop-element-onto-another-element >> >> Following is what i did: >> >> ((JavascriptExecutor)getDriver()).executeScript(" var draggableElement = >> $('#ues-store-gadget > div > div.row.ues-thumbnails > div:nth-child(1) > >> div').draggable({"+ >> >> "cancel: false," + >> >> "appendTo: 'body'," + // These are the >> options we gave when writing the draggable element. >> >> "helper: 'clone'," + >> >> "start: function (event, ui) {" + >> >> "ui.helper.addClass('ues-store-thumbnail');}," + >> >> "stop: function (event, ui) {" + >> >> "ui.helper.removeClass('ues-store-thumbnail');" + >> >> "}})," + >> >> "dropableElement=$('#a');"+ // Defining Dropable element >> >> "var droppableOffset = dropableElement.offset()," + // Get the >> Offset from droppable element >> >> "draggableOffset = draggableElement.offset()," + // Get the >> Offset from draggable element >> >> "dx = droppableOffset.left - draggableOffset.left," + >> >> "dy = droppableOffset.top - draggableOffset.top;" + >> >> "draggableElement.simulate('drag', {" + // Call the simulate method >> provided by jqeury.simulate.js >> >> "dx: dx," + >> >> "dy: dy" + >> >> "});"); >> >> Hope you find this helpful. >> >> Regards, >> >> >> On Thu, Oct 22, 2015 at 10:54 AM, Rajeenthini Satkunam < >> rajeenth...@wso2.com> wrote: >> >>> Hi All, >>> >>> I have resolved the previous issue mentioned above through lasantha's >>> solution which he was mentioned. @lasantha Thank you for your prompt reply. >>> Even though I could not do this drag and drop Action successfully to >>> selenium UI test case Java.I would like to share what kind of try I have >>> made for get this work out. I am not getting any errors while I am doing >>> the build.Test case has been passed consistently. >>> >>> Using Action come up with selenium Automation frame work >>> == >>> >>> Selenium Action[1] class used to interactions using selenium.I have >>> tried in 3 ways that has proposed by selenium to do drag and drop Action. >>> >>> 1) By Selected Action class >>> >>> Actions builder = new Actions(getDriver()); >>> Action dragAndDrop = builder.clickAndHold(gadget) >>>.
Re: [Dev] [DEV][Automation] - How to automate the Drag-Drop Action in Test-case Using selenium
Hi all, IMHO when we calling the Javascript method directly it does not mean actual drag and drop.So better we can try @nipuna suggestion as first making the elements draggable and try simulate function using jquery.simulate.js for drag and drop action,I have tried simulate earlier but I missed to make elements draggable.So I am working on this approach :). On Tue, Nov 3, 2015 at 11:55 AM, Nipuna Chandradasa <nipu...@wso2.com> wrote: > HI manu, > > I didn't try the 1st alternative that Rajeenthini mentioned ( set timeout > for ues thumbnails to make them drag-gable to drag and drop action). But > i tried the 2nd alternative which making createComponent() and > findStoreCache() methods public... and it worked. > > But isn't it good if we did not change the code to do the tests ... ? Also > Jquery uses their jquery.simulate.js to test there functionalities. So > using that to test the drag and drop in our scenario is good isn't it? > > On Tue, Nov 3, 2015 at 11:33 AM, Rajeenthini Satkunam < > rajeenth...@wso2.com> wrote: > >> Hi manu, >> >> I have tried with the modification done in my local checkout. >> >> 1) we have set timeout for ues thumbnails to make them drag-gable to drag >> and drop action. >> 2) we have called the javascript function { createComponent($("#a"), >> findStoreCache("gadget", "g1")); } to crate gadget using the method >> JavascriptExecutor >> >> By first approach I could not resolve the drag and drop action using >> selenium But the second approach works fine and we have drawback that we >> need to make two javascript function at designer.js file as global >> functions to use the createComponent to do drag and drop Action using >> selenium. >> >> As per discussion with @nipuna the only problem with our UI that only >> those elements are draggable when mouse over.So IMHO we can make them >> draggable and after that can do the drag and drop Action.I will go through >> the nipuna's suggestion as well and will update the mail thread. >> >> >> >> On Tue, Nov 3, 2015 at 6:35 AM, Manuranga Perera <m...@wso2.com> wrote: >> >>> I also noted the on mouseenter event drag-able issue and made a local >>> change in Rajeenthini's checkout. >>> Rajeenthini, were you able to test it with that change? >>> >>> On Mon, Nov 2, 2015 at 7:16 PM, Nipuna Chandradasa <nipu...@wso2.com> >>> wrote: >>> >>>> Hi Rajeenthini, >>>> >>>> I tried one of your references which uses jquery.simulate.js to test >>>> the jquery UI functionality. It worked. >>>> Only thing that it didnt work with out product is we only make the >>>> element draggable when the mouseenter event. I progamatically made it >>>> draggable. Then using jquery simulator i simulate the drag and drop. >>>> >>>> this is the link i refer ( it's 6th reference in your list :D ) >>>> >>>> >>>> http://stackoverflow.com/questions/16848165/programmatically-drag-and-drop-element-onto-another-element >>>> >>>> Following is what i did: >>>> >>>> ((JavascriptExecutor)getDriver()).executeScript(" var draggableElement = >>>> $('#ues-store-gadget > div > div.row.ues-thumbnails > div:nth-child(1) > >>>> div').draggable({"+ >>>> >>>> "cancel: false," + >>>> >>>> "appendTo: 'body'," + // These are the >>>> options we gave when writing the draggable element. >>>> >>>> "helper: 'clone'," + >>>> >>>> "start: function (event, ui) {" + >>>> >>>> "ui.helper.addClass('ues-store-thumbnail');}," + >>>> >>>> "stop: function (event, ui) {" + >>>> >>>> "ui.helper.removeClass('ues-store-thumbnail');" + >>>> >>>> "}})," + >>>> >>>> "dropableElement=$('#a');"+ // Defining Dropable element >>>> >>>> "var droppableOffset = dropableElement.offset()," + // Get the >>>> Offset from droppable element >>>> >>>> "draggableOffset = draggableElement.offset()," + // Get the >>>> Offset from draggable element >>>> >>>> "dx = droppableOffset.left - draggableOffset.left,"
Re: [Dev] [DEV][Automation] - How to automate the Drag-Drop Action in Test-case Using selenium
t file dnd.js (function ($) { $.fn.simulateDragDrop = function (options) { return this.each(function () { new $.simulateDragDrop(this, options); }); }; $.simulateDragDrop = function (elem, options) { this.options = options; this.simulateEvent(elem, options); }; $.extend($.simulateDragDrop.prototype, { simulateEvent: function (elem, options) { /*Simulating drag start*/ var type = 'dragstart'; var event = this.createEvent(type); this.dispatchEvent(elem, type, event); /*Simulating drop*/ type = 'drop'; var dropEvent = this.createEvent(type, {}); dropEvent.dataTransfer = event.dataTransfer; this.dispatchEvent($(options.dropTarget)[0], type, dropEvent); /*Simulating drag end*/ type = 'dragend'; var dragEndEvent = this.createEvent(type, {}); dragEndEvent.dataTransfer = event.dataTransfer; this.dispatchEvent(elem, type, dragEndEvent); }, createEvent: function (type) { var event = document.createEvent("CustomEvent"); event.initCustomEvent(type, true, true, null); event.dataTransfer = { data: { }, setData: function (type, val) { this.data[type] = val; }, getData: function (type) { return this.data[type]; } }; return event; }, dispatchEvent: function (elem, type, event) { if (elem.dispatchEvent) { elem.dispatchEvent(event); } else if (elem.fireEvent) { elem.fireEvent("on" + type, event); } } }); })(jQuery); above code is not giving any errors like previous one.Tests has been passed But the Action drag and drop is not happened. [1] - https://selenium.googlecode.com/git/docs/api/java/org/openqa/selenium/interactions/Actions.html [2] - http://www.nishantverma.com/2011/07/using-drag-and-drop-in-webdriver.html [3] - http://elementalselenium.com/tips/39-drag-and-drop [4] - http://stackoverflow.com/questions/14210051/how-to-automate-drag-drop-functionality-using-selenium-web-driver [5] - https://github.com/jquery/jquery-ui/blob/1-11-stable/tests/unit/droppable/droppable_events.js#L21-L33 [6] - http://stackoverflow.com/questions/16848165/programmatically-drag-and-drop-element-onto-another-element [7] - https://github.com/jquery/jquery-ui/blob/9e8e339648901899827a58e5bf919f7dda03b88e/tests/jquery.simulate.js And I have discussed about this at stackoverflow and linkedin as well you can get by these following links stackoverflow - http://stackoverflow.com/questions/33146808/executing-javascript-for-selenium-ui-integration-test-of-drag-and-drop-java Linkedin - https://www.linkedin.com/groups/961927/961927-6060654701249060868#commentID_6062515331736305664 I did not get any replies for stackoverflow ,But I got some points on linkedin selenium group. I have followed all those steps that has mentioned their replies. So can anyone please tryout this scenario and advice me to do this task?.Your help is appreciated mostly. On Fri, Oct 9, 2015 at 3:25 PM, Lasantha Samarakoon <lasant...@wso2.com> wrote: > Hi Rajeenthini, > > You are getting this exception because you can't cast the UESWebDriver > into HasInputDevices interface. That is because unlike other drivers such > as FirefoxDriver and ChromeDriver the UESWebDriver only implements the > WebDriver interface. > > Therefore you need to implement the HasInputDevices interface in > UESWebDriver in order to use those mouse and keyboard actions. > > > Regards, > > *Lasantha Samarakoon* | Software Engineer > WSO2, Inc. > #20, Palm Grove, Colombo 03, Sri Lanka > Mobile: +94 (71) 214 1576 > Email: lasant...@wso2.com > Web:www.wso2.com > > lean . enterprise . middleware > > On Thu, Oct 8, 2015 at 4:55 PM, Madusanka Premaratne <madusan...@wso2.com> > wrote: > >> Hi Rajinthini, >> It seems like you have to change the test case. Did you record the test >> case using selenium plugin? The best approach is write is yourself in this >> kind of scenarios. You can refer to the links[1] and [2] to get an idea. >> [1] - >> http://stackoverflow.com/questions/14210051/how-to-automate-drag-drop-functionality-using-selenium-web-driver >> [2] - http://www.toolsqa.com/selenium-webdriver/drag-drop/ >> >> Thanks, >> Madusanka >> >> On Thu, Oct 8, 2015 at 3:48 PM, Rajeenthini Satkunam < >> rajeenth...@wso2.com> wrote: >> >>> Hi All, >>> >>> I am currently working on writing UI test-cases using selenium for >>>
Re: [Dev] Error on FHIR connector integration Test case
ailed: >>>>> sun.security.provider.certpath.SunCertPathBuilderException: unable to find >>>>> valid certification path to requested target >>>>> at >>>>> sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:385) >>>>> at >>>>> sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292) >>>>> at sun.security.validator.Validator.validate(Validator.java:260) >>>>> at >>>>> sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:326) >>>>> at >>>>> sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:231) >>>>> at >>>>> sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:126) >>>>> at >>>>> sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1428) >>>>> ... 50 more >>>>> Caused by: sun.security.provider.certpath.SunCertPathBuilderException: >>>>> unable to find valid certification path to requested target >>>>> at >>>>> sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:196) >>>>> at >>>>> java.security.cert.CertPathBuilder.build(CertPathBuilder.java:268) >>>>> at >>>>> sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:380) >>>>> ... 56 more >>>>> >>>>> >>>>> -- >>>>> >>>>> >>>>> *Thank you and Regards**Hariprasath Thanarajah* >>>>> Associate Software Engineer | WSO2 >>>>> E: haripras...@wso2.com >>>>> M: +94752806528 >>>>> >>>>> >>>>> ___ >>>>> Dev mailing list >>>>> Dev@wso2.org >>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>>> >>>>> >>>> >>>> >>>> -- >>>> *S.Elilmatha* >>>> Associate Software Engineer, >>>> >>>> WSO2 Inc.; http://wso2.com >>>> lean.enterprise.middleware >>>> >>>> Mobile 0779842221. >>>> >>>> >>> >>> >>> -- >>> >>> >>> *Thank you and Regards**Hariprasath Thanarajah* >>> Associate Software Engineer | WSO2 >>> E: haripras...@wso2.com >>> M: +94752806528 >>> >>> >> >> >> -- >> >> >> *Thank you and Regards**Hariprasath Thanarajah* >> Associate Software Engineer | WSO2 >> E: haripras...@wso2.com >> M: +94752806528 >> >> > > > -- > > > *Thank you and Regards**Hariprasath Thanarajah* > Associate Software Engineer | WSO2 > E: haripras...@wso2.com > M: +94752806528 > > > ___ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com <rajeenth...@wso2.com>* *M :+94770832823 * ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
[Dev] [DEV][Automation] - How to automate the Drag-Drop Action in Test-case Using selenium
Hi All, I am currently working on writing UI test-cases using selenium for Dashboard Server(DS)/User Engagement Server.I have a test Case which needs to do a action that drag one element to a place and drop it in that place(drag and drop).So I have tried the below approach to do this task. public void testAddGadgetToDashboard() throws Exception { webElement = getDriver().findElement(By.id(dashboardTitle)); webElement.findElement(By.cssSelector("a[href=\"dashboards/" + dashboardTitle + "?editor=true\"]")).click(); WebElement draggable = getDriver().findElement(By.id("g1")); WebElement to = getDriver().findElement(By.id("a")); Actions builder = new Actions(getDriver()); Action dragAndDrop = builder.clickAndHold(draggable) .moveToElement(to) .release(to) .build(); dragAndDrop.perform(); } But I am getting an exception when running the test-case, FAILED: testAddGadgetToDashboard Adding gadgets to existing dashboard from dashboard server java.lang.ClassCastException: org.wso2.ues.ui.integration.util.UESWebDriver cannot be cast to org.openqa.selenium.interactions.HasInputDevices at org.openqa.selenium.interactions.Actions.(Actions.java:41) at org.wso2.ues.ui.integration.test.dashboard.AddgadgetToDashboardtest.testAddGadgetToDashboard(AddgadgetToDashboardtest.java:86) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84) at org.testng.internal.Invoker.invokeMethod(Invoker.java:714) at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901) at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111) at org.testng.TestRunner.privateRun(TestRunner.java:767) at org.testng.TestRunner.run(TestRunner.java:617) at org.testng.SuiteRunner.runTest(SuiteRunner.java:334) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291) at org.testng.SuiteRunner.run(SuiteRunner.java:240) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224) at org.testng.TestNG.runSuitesLocally(TestNG.java:1149) at org.testng.TestNG.run(TestNG.java:1057) at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:177) at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92) at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:105) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:103) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74) Can anyone please advice me on how this has gone wrong and Is selenium version or Firefox version are depends on this error thrown? Note: I am using Firefox version 27 and selenium version is automation selenium version. -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com <rajeenth...@wso2.com>* *M :+94770832823 * ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Is there any method which can checks the resource exists or not in registry
Hi, @kasun @rajith @denuwanthi @isuruwan Thanks you for your prompt reply.I have tried the way which isuruwan mentiond above.It is working fine now. On Wed, Oct 7, 2015 at 11:52 AM, Isuruwan Herath <isuru...@wso2.com> wrote: > Also if you're using ResourceAdminServiceClient, this [1] is an example > how resource exists is checked in G-Reg tests. > > [1] > https://github.com/wso2/product-greg/blob/master/modules/integration/tests-integration/tests-metadata/tests-metadata-content/src/test/java/org/wso2/carbon/registry/metadata/test/util/TestUtils.java#L171 > > On Wed, Oct 7, 2015 at 11:49 AM, Denuwanthi De Silva <denuwan...@wso2.com> > wrote: > >> Hi Rajeenthini, >> >> You need to pass an 'AutomationContext' object to 'getWSRegistry' method. >> Can you verify the method 'getUesContext' returns a proper >> AutomationContext? >> >> Ex of defining an automation context fro greg product >> AutomationContext context = new AutomationContext("GREG", >> TestUserMode.SUPER_TENANT_ADMIN); >> >> >> Thanks, >> >> On Tue, Oct 6, 2015 at 5:28 PM, Rajeenthini Satkunam < >> rajeenth...@wso2.com> wrote: >> >>> Hi rajith, >>> >>> I have tried the way you mentioned.When I use like this >>> >>> RegistryProviderUtil provider = new RegistryProviderUtil(); >>> WSRegistryServiceClient registry = provider.getWSRegistry(getUesContext()); >>> assertFalse(registry.resourceExists(resourcePath),"Registry resource could >>> not be deleted due to some errors"); >>> >>> It says like cannot resolve the method getWSRegistry(getUesContext()) >>> >>> But I have tried this way too >>> >>> WSRegistryServiceClient registry = >>> provider.getWSRegistry(getCurrentUsername(),getCurrentPassword(), >>> UESIntegrationTestConstants.UES_PRODUCT_NAME); >>> >>> But when I run the test cases it is giving me a null pointer exception at >>> the point when I created registry instance.Could you please advice me on >>> how can I resolve this issue? >>> >>> >>> >>> >>> On Tue, Oct 6, 2015 at 4:35 PM, Rajith Roshan <raji...@wso2.com> wrote: >>> >>>> Hi Rajeenthini, >>>> >>>> You can get the instance of registry as below and check if the resource >>>> exists. >>>> >>>> RegistryProviderUtil provider = new RegistryProviderUtil(); >>>> WSRegistryServiceClient registry = >>>> provider.getWSRegistry(automationContext); >>>> >>>> if(registry.resourceExists(path)) >>>> >>>> >>>> Thanks, >>>> >>>> Rajith >>>> >>>> >>>> On Tue, Oct 6, 2015 at 3:43 PM, Kasun Bandara <kas...@wso2.com> wrote: >>>> >>>>> Hi Rajeenthini, >>>>> >>>>> You can invoke the *boolean resourceExists(String resorcePath)* >>>>> method through the Registry class comes with registry core. Returns true >>>>> if >>>>> the resource exists in the specified path & returns false if it's not >>>>> reside in the path. >>>>> >>>>> Thanks and Regards. >>>>> >>>>> >>>>> On Tue, Oct 6, 2015 at 3:42 PM, Kasun Bandara <kas...@wso2.com> wrote: >>>>> >>>>>> Hi Rajeenthini, >>>>>> >>>>>> You can invoke the *boolean resourceExists(String resorcePath)* >>>>>> method through the Registry class comes with registry core. Returns true >>>>>> if >>>>>> the resource exists in the specified path & returns false if it's not >>>>>> reside in the path. >>>>>> >>>>>> Thanks and Regards. >>>>>> >>>>>> >>>>>> On Tue, Oct 6, 2015 at 12:35 PM, Rajeenthini Satkunam < >>>>>> rajeenth...@wso2.com> wrote: >>>>>> >>>>>>> Hi all, >>>>>>> >>>>>>> I am writing UI test cases for UES/Dashboard Server(DS).I have tried >>>>>>> to write a test class for adding and deleting dashboard for the >>>>>>> Dashboard >>>>>>> Server.Here I need to check the resource is existing or not at the >>>>>>> registry.You can have a look for the class[1] I have wrote for adding >>>>>>> and >>>>>
[Dev] Is there any method which can checks the resource exists or not in registry
Hi all, I am writing UI test cases for UES/Dashboard Server(DS).I have tried to write a test class for adding and deleting dashboard for the Dashboard Server.Here I need to check the resource is existing or not at the registry.You can have a look for the class[1] I have wrote for adding and deleting dashboard. [1] - https://github.com/rajeenthini/product-ues/commit/e642d50edf08cc21d2b0a2b21463e4b3aadc587a BTW I have modified my code in some ways .Those are I have included below - Deleted deleteResource method from here resourceAdminServiceClient.deleteResource(resourcePath); @AfterClass(alwaysRun = true) public void tearDown() throws MalformedURLException, XPathExpressionException, RemoteException, ResourceAdminServiceExceptionException { try{ UESUIIntegrationTest.logout(getDriver(), getBaseUrl(), getCurrentUsername()); }finally { getDriver().quit(); } } - Added some code segment to the method deleteDashboard @Test(groups = "wso2.ues.dashboard", description = "Deleting added dashboard", dependsOnMethods = "testAddDashboardNew") public void testDeleteDashboardNew() throws MalformedURLException, XPathExpressionException, RemoteException, ResourceAdminServiceExceptionException { webElement = getDriver().findElement(By.id(dashboardTitle)); webElement.findElement(By.cssSelector("i.fw-delete")).click(); getDriver().findElement(By.cssSelector("span.ladda-label")).click(); assertFalse(getDriver().isElementPresent(By.id(dashboardTitle)), "Error occurred while deleting dashboard" + dashboardTitle); ResourceData[] resourceData = resourceAdminServiceClient.getResourceData(resourcePath); assertTrue(resourceData.length == 0,"Registry resource could not be deleted due to some errors"); } Now it's giving me exception when there is no such registry resource after dashboard was deleted by UI testcase. org.apache.axis2.AxisFault: Resource does not exist at path /_system/config/ues/dashboards/sampledashboard1 So can anyone give some suggestions on $subject? Thanks in advance. -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com <rajeenth...@wso2.com>* *M :+94770832823 * ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Is there any method which can checks the resource exists or not in registry
Hi rajith, I have tried the way you mentioned.When I use like this RegistryProviderUtil provider = new RegistryProviderUtil(); WSRegistryServiceClient registry = provider.getWSRegistry(getUesContext()); assertFalse(registry.resourceExists(resourcePath),"Registry resource could not be deleted due to some errors"); It says like cannot resolve the method getWSRegistry(getUesContext()) But I have tried this way too WSRegistryServiceClient registry = provider.getWSRegistry(getCurrentUsername(),getCurrentPassword(), UESIntegrationTestConstants.UES_PRODUCT_NAME); But when I run the test cases it is giving me a null pointer exception at the point when I created registry instance.Could you please advice me on how can I resolve this issue? On Tue, Oct 6, 2015 at 4:35 PM, Rajith Roshan <raji...@wso2.com> wrote: > Hi Rajeenthini, > > You can get the instance of registry as below and check if the resource > exists. > > RegistryProviderUtil provider = new RegistryProviderUtil(); > WSRegistryServiceClient registry = provider.getWSRegistry(automationContext); > > if(registry.resourceExists(path)) > > > Thanks, > > Rajith > > > On Tue, Oct 6, 2015 at 3:43 PM, Kasun Bandara <kas...@wso2.com> wrote: > >> Hi Rajeenthini, >> >> You can invoke the *boolean resourceExists(String resorcePath)* method >> through the Registry class comes with registry core. Returns true if the >> resource exists in the specified path & returns false if it's not reside in >> the path. >> >> Thanks and Regards. >> >> >> On Tue, Oct 6, 2015 at 3:42 PM, Kasun Bandara <kas...@wso2.com> wrote: >> >>> Hi Rajeenthini, >>> >>> You can invoke the *boolean resourceExists(String resorcePath)* method >>> through the Registry class comes with registry core. Returns true if the >>> resource exists in the specified path & returns false if it's not reside in >>> the path. >>> >>> Thanks and Regards. >>> >>> >>> On Tue, Oct 6, 2015 at 12:35 PM, Rajeenthini Satkunam < >>> rajeenth...@wso2.com> wrote: >>> >>>> Hi all, >>>> >>>> I am writing UI test cases for UES/Dashboard Server(DS).I have tried to >>>> write a test class for adding and deleting dashboard for the Dashboard >>>> Server.Here I need to check the resource is existing or not at the >>>> registry.You can have a look for the class[1] I have wrote for adding and >>>> deleting dashboard. >>>> [1] - >>>> https://github.com/rajeenthini/product-ues/commit/e642d50edf08cc21d2b0a2b21463e4b3aadc587a >>>> >>>> BTW I have modified my code in some ways .Those are I have included >>>> below >>>> - Deleted deleteResource method from here >>>> resourceAdminServiceClient.deleteResource(resourcePath); >>>> >>>> @AfterClass(alwaysRun = true) >>>> public void tearDown() throws MalformedURLException, >>>> XPathExpressionException, RemoteException, >>>> ResourceAdminServiceExceptionException { >>>> try{ >>>> UESUIIntegrationTest.logout(getDriver(), getBaseUrl(), >>>> getCurrentUsername()); >>>> }finally { >>>> getDriver().quit(); >>>> } >>>> } >>>> >>>> - Added some code segment to the method deleteDashboard >>>> >>>> @Test(groups = "wso2.ues.dashboard", description = "Deleting added >>>> dashboard", dependsOnMethods = "testAddDashboardNew") >>>> public void testDeleteDashboardNew() throws MalformedURLException, >>>> XPathExpressionException, RemoteException, >>>> ResourceAdminServiceExceptionException { >>>> webElement = getDriver().findElement(By.id(dashboardTitle)); >>>> webElement.findElement(By.cssSelector("i.fw-delete")).click(); >>>> getDriver().findElement(By.cssSelector("span.ladda-label")).click(); >>>> assertFalse(getDriver().isElementPresent(By.id(dashboardTitle)), >>>> "Error occurred while deleting dashboard" + dashboardTitle); >>>> ResourceData[] resourceData = >>>> resourceAdminServiceClient.getResourceData(resourcePath); >>>> assertTrue(resourceData.length == 0,"Registry resource could not be >>>> deleted due to some errors"); >>>> } >>>> >>>> Now it's giving me exception when there is no such registry resource >>>> after dashboard was
[Dev] [DEV] [Automation] How to get a value from Automation.xml file to test classes
Hi all, I am currently working on writing UI integration tests for product UES using selenium.I have to make maximum waiting time for search element by() as default value.As per discussion it can be configured through automation.xml file. I have added 30 at automation.xml file.So I need to get the value of it for test java classes.Can anyone please give any suggestion on how to get that value? -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com <rajeenth...@wso2.com>* *M :+94770832823 * ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] [DEV] [Automation] How to get a value from Automation.xml file to test classes
Hi all, Thank you for your prompt reply.I have done this from uesAutomationContext. getConfigurationValue("//maximumWaitingTime") and Now I can get the value for maximumWaitingTime. On Mon, Sep 28, 2015 at 2:20 PM, Pumudu Ruhunage <pum...@wso2.com> wrote: > Hi, > > Have you tried something like this? > > AutomationContext automationContext; > automationContext = new AutomationContext(); > String maximumWaitingTime = > automationContext.getInstance().getProperty("maximumWaitingTime"); > > It's better if you can check how other integration tests were written and > follow the same pattern to refer automation.xml. (without creating new > automationContext and use already initialized objects etc.) > > Regards, > Pumudu > > On Mon, Sep 28, 2015 at 2:05 PM, Mushthaq Rumy <musht...@wso2.com> wrote: > >> Hi Rajeenthani, >> >> I think you need to create an object instance of AutomationContext within >> your java class and proceed with it. The below link[1] might be useful for >> you. >> >> [1] >> http://malinthas.blogspot.com/2014/02/how-to-obtain-configuration-details.html >> . >> >> >> >> On Mon, Sep 28, 2015 at 1:44 PM, Rajeenthini Satkunam < >> rajeenth...@wso2.com> wrote: >> >>> Hi all, >>> >>> I am currently working on writing UI integration tests for product UES >>> using selenium.I have to make maximum waiting time for search element by() >>> as default value.As per discussion it can be configured through >>> automation.xml file. I have added 30>> maximumWaitingTime> at automation.xml file.So I need to get the value >>> of it for test java classes.Can anyone please give any suggestion on how to >>> get that value? >>> >>> -- >>> >>> *Thank You.* >>> >>> *Rajeenthini Satkunam* >>> >>> *Associate Software Engineer | WSO2* >>> >>> >>> *E:rajeenth...@wso2.com <rajeenth...@wso2.com>* >>> >>> *M :+94770832823 <%2B94770832823> * >>> >>> >>> ___ >>> Dev mailing list >>> Dev@wso2.org >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> >> Thanks & Regards, >> -- >> Mushthaq Rumy >> *Software Engineer* >> Mobile : +94 (0) 779 492140 <%2B94%20%280%29%20773%20451194> >> Email : musht...@wso2.com >> WSO2, Inc.; http://wso2.com/ >> lean . enterprise . middleware. >> >> ___ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Pumudu Ruhunage > Associate Software Engineer | WSO2 Inc > M: +94 779 664493 | http://wso2.com > -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com <rajeenth...@wso2.com>* *M :+94770832823 * ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] [Integration Tests] What is the advantage of Exception being thrown in test methods instead of the specific subclass of it?
Hi Manuri, In my point of view The Exception is the super class of all subclass of exceptions inherited. In case you know strongly which type of exception could be thrown while execution it is better to use the exact instance of sub class of exception rather than catching generic exception while the execution On Tue, Sep 8, 2015 at 11:24 AM, Nuwan Wimalasekara <nuw...@wso2.com> wrote: > Hi Manuri, > > Even if we throws the sub classes in test methods , no one will handle > those exception explicitly. It is handled by TestNg and TestsNg marked them > error when exception is thrown from a test method and we can see the actual > exception class in test reports. Throwing super class also make sure that > the test method will not be broken even exception classes is changed in the > method which are used in test methods. > > Please refer the mail thread "Best Practice in Throwing Exceptions in test > methods signature"@dev > > Thanks, > Nuwanw > > On Tue, Sep 8, 2015 at 11:05 AM, Manuri Amaya Perera <manu...@wso2.com> > wrote: > >> Hi, >> >> I got to know it is recommended to throw Exception in test methods >> instead of the specific sub class of it. But generally in methods the good >> practice is to throw the exception of the specific sub class. >> >> I'd like to know $subject. >> >> Thank you. >> >> -- >> >> *Manuri Amaya Perera* >> >> *Software Engineer* >> >> *WSO2 Inc.* >> >> *Blog: http://manuriamayaperera.blogspot.com >> <http://manuriamayaperera.blogspot.com>* >> > > > > -- > Nuwan Wimalasekara > Senior Software Engineer - Test Automation > WSO2, Inc.: http://wso2.com > lean. enterprise. middleware > > phone: +94 71 668 4620 > > > > > ___ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com <rajeenth...@wso2.com>* *M :+94770832823 * ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] [Integration Tests] What is the advantage of Exception being thrown in test methods instead of the specific subclass of it?
Hi iqbal, I got your point. On Tue, Sep 8, 2015 at 1:32 PM, Irham Iqbal <iq...@wso2.com> wrote: > Hi Rajeenthini, > > We don't catch any exception inside test methods we just throw the > Exception from it. Even though if you catch the exception and throw the > specific exception testng is the one going to handle this. If you see the > testng report you can see the stack trace of the exception where it occur. > > Thanks, > Iqbal > > On Tue, Sep 8, 2015 at 11:31 AM, Rajeenthini Satkunam < > rajeenth...@wso2.com> wrote: > >> Hi Manuri, >> >> In my point of view The Exception is the super class of all subclass of >> exceptions inherited. In case you know strongly which type of exception >> could be thrown while execution it is better to use the exact instance of >> sub class of exception rather than catching generic exception while the >> execution >> >> >> On Tue, Sep 8, 2015 at 11:24 AM, Nuwan Wimalasekara <nuw...@wso2.com> >> wrote: >> >>> Hi Manuri, >>> >>> Even if we throws the sub classes in test methods , no one will handle >>> those exception explicitly. It is handled by TestNg and TestsNg marked them >>> error when exception is thrown from a test method and we can see the actual >>> exception class in test reports. Throwing super class also make sure that >>> the test method will not be broken even exception classes is changed in the >>> method which are used in test methods. >>> >>> Please refer the mail thread "Best Practice in Throwing Exceptions in >>> test methods signature"@dev >>> >>> Thanks, >>> Nuwanw >>> >>> On Tue, Sep 8, 2015 at 11:05 AM, Manuri Amaya Perera <manu...@wso2.com> >>> wrote: >>> >>>> Hi, >>>> >>>> I got to know it is recommended to throw Exception in test methods >>>> instead of the specific sub class of it. But generally in methods the good >>>> practice is to throw the exception of the specific sub class. >>>> >>>> I'd like to know $subject. >>>> >>>> Thank you. >>>> >>>> -- >>>> >>>> *Manuri Amaya Perera* >>>> >>>> *Software Engineer* >>>> >>>> *WSO2 Inc.* >>>> >>>> *Blog: http://manuriamayaperera.blogspot.com >>>> <http://manuriamayaperera.blogspot.com>* >>>> >>> >>> >>> >>> -- >>> Nuwan Wimalasekara >>> Senior Software Engineer - Test Automation >>> WSO2, Inc.: http://wso2.com >>> lean. enterprise. middleware >>> >>> phone: +94 71 668 4620 >>> >>> >>> >>> >>> ___ >>> Dev mailing list >>> Dev@wso2.org >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> >> >> -- >> >> *Thank You.* >> >> *Rajeenthini Satkunam* >> >> *Associate Software Engineer | WSO2* >> >> >> *E:rajeenth...@wso2.com <rajeenth...@wso2.com>* >> >> *M :+94770832823 <%2B94770832823> * >> >> >> ___ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Irham Iqbal > Software Engineer - Test Automation > WSO2, Inc.: http://wso2.com > lean. enterprise. middleware > phone: +94 777888452 > -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com <rajeenth...@wso2.com>* *M :+94770832823 * ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
[Dev] [DEV] - How to send a AJAX call when User finish typing at the textbox
Hi all, Currently I am working on a task validating CRUD forms of Enterprise store publisher.So I need to check with the overview name is already exists or not.So I will make a AJAX call through server side to get the exactly matching asset in the publisher.I am using jQuery validation plugin as well as I have an custom method to validate this overview name field on the client side. //custom validator for remote ajax call to validate asset name $.validator.addMethod(FieldValidate, function (value, element) { var data = '%22name%22 : %22' + value + '%22'; var result = false; $.ajax({ type: GET, url: caramel.url(/apis/assets?type=gadgetq= + data), dataType: json, async: false, success: function (data, textStatus, xhr) { var obj = data; if (obj.list.length 0) { result = false; } else { result = true; } }, error: function (xhr, thrownError) { console.log(error + xhr.responseText ++ thrownError); } }); return result; }, The name already taken); By the way I need to trigger the validation only if the user finish typing at the text box.But now the Ajax call sends for each and every input those are given by user.So can anyone suggest me any idea to handle this? Suggestion would appreciate. -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com rajeenth...@wso2.com* *M :+94770832823 * ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
[Dev] Please Review and Merge PR
Hi all, Please review and merge the pull request[1].This is for adding a test class for UI integration on validations for forms. [1] - https://github.com/wso2/product-es/pull/165 -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com rajeenth...@wso2.com* *M :+94770832823 * ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
[Dev] Please Review and Merge PR
Hi all, Please review and merge the pull request[1].This is for adding client-side and server-side validations for Enterprise Store publisher. [1] - https://github.com/wso2/carbon-store/pull/33 -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com rajeenth...@wso2.com* *M :+94770832823 * ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Could not run the test-ui testcases - Enterprise Store
Hi, As per discussion for this error ,If we instrument the jar file in the web application It failed to deploy.So we need to debug and see what is an exact issue on this. Just for a workaround for UI tests Enterprise store I have disabled the coverage in automation.xml coveragefalse/coverage.And I could run the build without any issue. Can anyone find out the exact issue on this? On Thu, May 7, 2015 at 11:03 AM, Nuwan Wimalasekara nuw...@wso2.com wrote: Hi Rajeenthini The issue is with the ESServerExtensionForWait class. Please debug and see why it does not send the json message. Thanks, Nuwanw On Thu, May 7, 2015 at 10:57 AM, Rajeenthini Satkunam rajeenth...@wso2.com wrote: Hi pumudu, The selenium version in the POM is 2.40.0.And I have checked the compatibility of firefox version with selenium version,it supports Firefox 27, 26, 24, 17.I am currently using firefox version 27.Please refer the link[1] for supported firefox version. [1] - Platforms Supported by Selenium http://docs.seleniumhq.org/about/platforms.jsp But I am getting the above error when do the UI tests. On Thu, May 7, 2015 at 9:28 AM, Pumudu Ruhunage pum...@wso2.com wrote: Hi Rajeenthini, Can you check firefox version and make sure it's compatible with the test framework. AFAIK ui test framework works with firefox version 21. make sure to disable firefox automatic updates before start tests as well. Regards, On Thu, May 7, 2015 at 7:38 AM, Rajeenthini Satkunam rajeenth...@wso2.com wrote: Hi all, Currently I am working on fixing UI test failures for Enterprise Store.I could not run the test cases and build failure when I run the test cases *mvn clean install -DskipUiTests=false -Dwebdriver.firefox.bin=/home/rajee/firfox/firefox/firefox-bin* from */Documents/TeamES/ProductES/product-es/modules/integration/tests-ui-integration/tests-ui* I am getting this error below ERROR [org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener] - Execution error occurred in TestExecutionListener:-[Ljava.lang.StackTraceElement;@7a43fb04 org.apache.maven.surefire.util.SurefireReflectionException: java.lang.reflect.InvocationTargetException; nested exception is java.lang.reflect.InvocationTargetException: null java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:103) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74) Caused by: java.lang.RuntimeException: Error on initializing test environment at org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener.handleException(TestExecutionListener.java:71) at org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener.onExecutionStart(TestExecutionListener.java:52) at org.testng.TestNG.runExecutionListeners(TestNG.java:1094) at org.testng.TestNG.run(TestNG.java:1041) at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:177) at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92) at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:105) ... 9 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.wso2.carbon.automation.engine.extensions.TestNGExtensionExecutor.executeExtensible(TestNGExtensionExecutor.java:75) at org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener.onExecutionStart(TestExecutionListener.java:47) ... 14 more Caused by: java.lang.IllegalStateException: Not a JSON Object: null at com.google.gson.JsonElement.getAsJsonObject(JsonElement.java:84) at org.wso2.es.integration.common.utils.AssetsRESTClient.login(AssetsRESTClient.java:92) at org.wso2.es.integration.common.utils.AssetsRESTClient.isIndexCompleted(AssetsRESTClient.java:212) at org.wso2.es.integration.common.utils.ESServerExtensionForWait.waitTillIndexingCompletes(ESServerExtensionForWait.java:85) at org.wso2.es.integration.common.utils.ESServerExtensionForWait.onExecutionStart(ESServerExtensionForWait.java:45) ... 20 more Can anyone give me
[Dev] Could not run the test-ui testcases - Enterprise Store
Hi all, Currently I am working on fixing UI test failures for Enterprise Store.I could not run the test cases and build failure when I run the test cases *mvn clean install -DskipUiTests=false -Dwebdriver.firefox.bin=/home/rajee/firfox/firefox/firefox-bin* from */Documents/TeamES/ProductES/product-es/modules/integration/tests-ui-integration/tests-ui* I am getting this error below ERROR [org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener] - Execution error occurred in TestExecutionListener:-[Ljava.lang.StackTraceElement;@7a43fb04 org.apache.maven.surefire.util.SurefireReflectionException: java.lang.reflect.InvocationTargetException; nested exception is java.lang.reflect.InvocationTargetException: null java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:103) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74) Caused by: java.lang.RuntimeException: Error on initializing test environment at org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener.handleException(TestExecutionListener.java:71) at org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener.onExecutionStart(TestExecutionListener.java:52) at org.testng.TestNG.runExecutionListeners(TestNG.java:1094) at org.testng.TestNG.run(TestNG.java:1041) at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:177) at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92) at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:105) ... 9 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.wso2.carbon.automation.engine.extensions.TestNGExtensionExecutor.executeExtensible(TestNGExtensionExecutor.java:75) at org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener.onExecutionStart(TestExecutionListener.java:47) ... 14 more Caused by: java.lang.IllegalStateException: Not a JSON Object: null at com.google.gson.JsonElement.getAsJsonObject(JsonElement.java:84) at org.wso2.es.integration.common.utils.AssetsRESTClient.login(AssetsRESTClient.java:92) at org.wso2.es.integration.common.utils.AssetsRESTClient.isIndexCompleted(AssetsRESTClient.java:212) at org.wso2.es.integration.common.utils.ESServerExtensionForWait.waitTillIndexingCompletes(ESServerExtensionForWait.java:85) at org.wso2.es.integration.common.utils.ESServerExtensionForWait.onExecutionStart(ESServerExtensionForWait.java:45) ... 20 more Can anyone give me the solution to solve this? -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com rajeenth...@wso2.com* *M :+94770832823 * ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Could not run the test-ui testcases - Enterprise Store
Hi pumudu, The selenium version in the POM is 2.40.0.And I have checked the compatibility of firefox version with selenium version,it supports Firefox 27, 26, 24, 17.I am currently using firefox version 27.Please refer the link[1] for supported firefox version. [1] - Platforms Supported by Selenium http://docs.seleniumhq.org/about/platforms.jsp But I am getting the above error when do the UI tests. On Thu, May 7, 2015 at 9:28 AM, Pumudu Ruhunage pum...@wso2.com wrote: Hi Rajeenthini, Can you check firefox version and make sure it's compatible with the test framework. AFAIK ui test framework works with firefox version 21. make sure to disable firefox automatic updates before start tests as well. Regards, On Thu, May 7, 2015 at 7:38 AM, Rajeenthini Satkunam rajeenth...@wso2.com wrote: Hi all, Currently I am working on fixing UI test failures for Enterprise Store.I could not run the test cases and build failure when I run the test cases *mvn clean install -DskipUiTests=false -Dwebdriver.firefox.bin=/home/rajee/firfox/firefox/firefox-bin* from */Documents/TeamES/ProductES/product-es/modules/integration/tests-ui-integration/tests-ui* I am getting this error below ERROR [org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener] - Execution error occurred in TestExecutionListener:-[Ljava.lang.StackTraceElement;@7a43fb04 org.apache.maven.surefire.util.SurefireReflectionException: java.lang.reflect.InvocationTargetException; nested exception is java.lang.reflect.InvocationTargetException: null java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:103) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74) Caused by: java.lang.RuntimeException: Error on initializing test environment at org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener.handleException(TestExecutionListener.java:71) at org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener.onExecutionStart(TestExecutionListener.java:52) at org.testng.TestNG.runExecutionListeners(TestNG.java:1094) at org.testng.TestNG.run(TestNG.java:1041) at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:177) at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92) at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:105) ... 9 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.wso2.carbon.automation.engine.extensions.TestNGExtensionExecutor.executeExtensible(TestNGExtensionExecutor.java:75) at org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener.onExecutionStart(TestExecutionListener.java:47) ... 14 more Caused by: java.lang.IllegalStateException: Not a JSON Object: null at com.google.gson.JsonElement.getAsJsonObject(JsonElement.java:84) at org.wso2.es.integration.common.utils.AssetsRESTClient.login(AssetsRESTClient.java:92) at org.wso2.es.integration.common.utils.AssetsRESTClient.isIndexCompleted(AssetsRESTClient.java:212) at org.wso2.es.integration.common.utils.ESServerExtensionForWait.waitTillIndexingCompletes(ESServerExtensionForWait.java:85) at org.wso2.es.integration.common.utils.ESServerExtensionForWait.onExecutionStart(ESServerExtensionForWait.java:45) ... 20 more Can anyone give me the solution to solve this? -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com rajeenth...@wso2.com* *M :+94770832823 %2B94770832823 * ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev -- Pumudu Ruhunage Associate Software Engineer | WSO2 Inc M: +94 779 664493 | http://wso2.com -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com rajeenth...@wso2.com* *M :+94770832823 * ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Enterprise Store - UI test failures
.es.ui.integration.test.publisher.ESPublisherAddEditAssetTestCase): Timed out after 30 seconds waiting for presence of element located by: By.linkText: Add gadget(..) testESStoreBookmarkTestCase(org.wso2.es.ui.integration.test.store.ESStoreBookmarkTestCase): Timed out after 30 seconds waiting for text ('Bookmarked') to be present in element found by By.id: btn-add-gadget(..) setUp(org.wso2.es.ui.integration.test.publisher.ESPublisherLCTransitionTestCase): Timed out after 30 seconds waiting for presence of element located by: By.linkText: Add gadget(..) tearDown(org.wso2.es.ui.integration.test.publisher.ESPublisherLCTransitionTestCase) testLoggedInHomePage(org.wso2.es.ui.integration.test.store.ESStoreCarbonSuperUserTUHomePageTestCase): Timed out after 30 seconds waiting for presence of element located by: By.selector: div.span3.store-right div.row div.span3(..) testLoggedInNavigationLinks(org.wso2.es.ui.integration.test.store.ESStoreCarbonSuperUserTUHomePageTestCase): Recent Gadgets link not working expected [Stacked Line Chart] but found [Line Chart] testGadgetPage(org.wso2.es.ui.integration.test.store.ESStoreGadgetPageTestCase): Timed out after 30 seconds waiting for presence of element located by: By.xpath: //a[contains(text(),'Line Plus Bar Chart')](..) testAddAsset(org.wso2.es.ui.integration.test.store.ESStoreSearchGadgetListTestCase): Timed out after 30 seconds waiting for presence of element located by: By.linkText: Add gadget(..) Tests run: 88, Failures: 25, Errors: 0, Skipped: 31 Thanks, Krishantha. On Mon, Apr 20, 2015 at 3:29 PM, Krishantha Samaraweera krishan...@wso2.com wrote: Hi all, I see following UI failures in master branch. Please have a look. Failed tests: testESPublisherAddedAssetTestCase(org.wso2.es.ui.integration.extension.test.publisher.ESPublisherAddedAssetTestCase): Timed out after 30 seconds waiting for presence of element located by: By.linkText: Services(..) testESPublisherAssetCaramelPageTestCase(org.wso2.es.ui.integration.extension.test.publisher.ESPublisherAssetCaramelPageTestCase): Timed out after 30 seconds waiting for presence of element located by: By.linkText: Overview(..) setUp(org.wso2.es.ui.integration.extension.test.publisher.ESPublisherAssetOverridePartialTestCase): Timed out after 30 seconds waiting for presence of element located by: By.linkText: Add servicex(..) setUp(org.wso2.es.ui.integration.extension.test.publisher.ESPublisherAssetOverrideRendererTestCase): Timed out after 30 seconds waiting for presence of element located by: By.linkText: Add servicex(..) *Tests run: 15, Failures: 4, Errors: 0, Skipped: 2* Thanks, Krishantha. -- Krishantha Samaraweera Senior Technical Lead - Test Automation Mobile: +94 77 7759918 WSO2, Inc.; http://wso2.com/ lean . enterprise . middlewear. -- Krishantha Samaraweera Senior Technical Lead - Test Automation Mobile: +94 77 7759918 WSO2, Inc.; http://wso2.com/ lean . enterprise . middlewear. ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev -- *Udara Rathnayake* Software Engineer WSO2 Inc. : http://wso2.com Mobile : 1 4087864651 | 94 772207239 Twitter : http://twitter.com/udarakr Blog: http://udarakr.blogspot.com ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev -- *Ayesha Dissanayaka* Software Engineer, WSO2, Inc : http://wso2.com http://www.google.com/url?q=http%3A%2F%2Fwso2.comsa=Dsntz=1usg=AFQjCNEZvyc0uMD1HhBaEGCBxs6e9fBObg 20, Palmgrove Avenue, Colombo 3 E-Mail: aye...@wso2.com ayshsa...@gmail.com -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com rajeenth...@wso2.com* *M :+94770832823 * ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Code Review on ToodleDo Connector
HI, We have tried to maven install with skip testing I could not build it because of some dependencies are not resolved or may be permanently moved from maven repository. Non re-solved dependencies 1) groupId - org.wso2.carbon artifactId - org.wso2.carbon.integration.common.extensions version - 4.3.0 2) groupId - org.wso2.carbon artifactId - org.wso2.carbon.integration.common.admin.client version - 4.3.0 So can you please tell how can I solve the failed dependencies which are non re-solved and what are the dependencies I need to add in POM file to overcome this failure.I have attached our POM file also. On Mon, Mar 16, 2015 at 5:28 PM, Rajeenthini Satkunam rajeenth...@wso2.com wrote: Hi, Noted. On Mon, Mar 16, 2015 at 1:29 PM, Elilmatha Sivanesan elilma...@wso2.com wrote: Hi Dinithi and Rajeenthini, Can you please check on this an give the pull request to https://github.com/wso2/esb-connectors . Thank you. On Wed, Feb 25, 2015 at 10:56 PM, Dinithi De Silva dinit...@wso2.com wrote: Hi Elil, AFAIK some of the dependencies are moved to a new location from the old location. That must be the reason for the test failure. I'll check what are the dependencies missing and inform you soon. Thanks On Wed, Feb 25, 2015 at 5:17 PM, Elilmatha Sivanesan elilma...@wso2.com wrote: Hi Dinithi and Rajeenthini, I'm testing ToodleDo Connector[1] and all the tests are failed, and when i test mannually I'm unable to upload the ToodleDo.zip error log [2] Your opinions are appreciated. [1] https://github.com/dinithiviranga/ToodledoESBConnector [2] https://docs.google.com/a/wso2.com/document/d/1YA-rg9WIbwb5bsh3LoCdfLdwVmA4A1zQ_pmAgEc0RlA/edit https://docs.google.com/a/wso2.com/document/d/1YA-rg9WIbwb5bsh3LoCdfLdwVmA4A1zQ_pmAgEc0RlA/edit Thank you. -- *S.Elilmatha* Associate Software Engineer, WSO2 Inc.; http://wso2.com lean.enterprise.middleware Mobile 0779842221. -- *Dinithi De Silva* Associate Software Engineer, WSO2 Inc. m:+94716667655 | e:dinit...@wso2.com | w: www.wso2.com | a: #20, Palm Grove, Colombo 03 -- *S.Elilmatha* Associate Software Engineer, WSO2 Inc.; http://wso2.com lean.enterprise.middleware Mobile 0779842221. -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com rajeenth...@wso2.com* *M :+94770832823 %2B94770832823 * -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com rajeenth...@wso2.com* *M :+94770832823 * ?xml version=1.0 encoding=UTF-8? project xmlns=http://maven.apache.org/POM/4.0.0; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd; modelVersion4.0.0/modelVersion groupIdcom.wso2.esb.connector/groupId artifactIdcom.wso2.esb.connector.toodledo/artifactId version1.0.0/version packagingjar/packaging nameWSO2 Carbon - Mediation Library Connector For toodledo/name urlhttp://wso2.org/url dependencies dependency groupIdorg.wso2.carbon/groupId artifactIdorg.wso2.carbon.mediation.initializer/artifactId version${stub.version}/version /dependency dependency groupIdorg.apache.synapse/groupId artifactIdsynapse-core/artifactId version2.1.1-wso2v7/version /dependency dependency groupIdorg.wso2.carbon/groupId artifactIdorg.wso2.carbon.connector.core/artifactId version4.2.0/version /dependency dependency groupIdorg.wso2.carbon.automation/groupId artifactIdorg.wso2.carbon.automation.engine/artifactId version${automation.framework.version}/version /dependency dependency groupIdorg.wso2.carbon.automation/groupId artifactIdorg.wso2.carbon.automation.core/artifactId version${test.framework.version}/version scopetest/scope /dependency dependency groupIdorg.wso2.carbon.automation/groupId artifactIdorg.wso2.carbon.automation.test.utils/artifactId version${automation.framework.version}/version /dependency dependency groupIdorg.wso2.carbon.automation/groupId artifactIdorg.wso2.carbon.automation.extensions/artifactId version${automation.framework.version}/version /dependency dependency groupIdorg.wso2.carbon/groupId artifactIdorg.wso2.carbon.integration.common.extensions/artifactId version${common.version}/version /dependency dependency groupIdorg.wso2.carbon/groupId artifactIdorg.wso2.carbon.integration.common.admin.client/artifactId version${common.version}/version /dependency
Re: [Dev] Code Review on ToodleDo Connector
Hi tharik, It has built without error. On Tue, Mar 17, 2015 at 1:20 PM, Tharik Kanaka tha...@wso2.com wrote: Hi Rajeenthini, Now above dependency group Id's have been updated. Please use following dependencies. I have included test automation dependencies as well. dependency groupIdorg.wso2.carbon.automation/groupId artifactIdorg.wso2.carbon.automation.test.utils/artifactId version${carbon.automation.version}/version /dependency dependency groupIdorg.wso2.carbon.automation/groupId artifactIdorg.wso2.carbon.automation.engine/artifactId version${carbon.automation.version}/version /dependency dependency groupIdorg.wso2.carbon.automation/groupId artifactIdorg.wso2.carbon.automation.extensions/artifactId version${carbon.automation.version}/version /dependency dependency groupIdorg.wso2.carbon.automationutils/groupId artifactIdorg.wso2.carbon.integration.common.extensions/artifactId version${carbon.automationutils.version}/version /dependency dependency groupIdorg.wso2.carbon.automationutils/groupId artifactIdorg.wso2.carbon.integration.common.utils/artifactId version${carbon.automationutils.version}/version /dependency dependency groupIdorg.wso2.carbon.automationutils/groupId artifactIdorg.wso2.carbon.integration.common.admin.client/artifactId version${carbon.automationutils.version}/version /dependency carbon.automation.version4.3.1/carbon.automation.version carbon.automationutils.version4.3.0/carbon.automationutils.version On Tue, Mar 17, 2015 at 12:31 PM, Rajeenthini Satkunam rajeenth...@wso2.com wrote: HI, We have tried to maven install with skip testing I could not build it because of some dependencies are not resolved or may be permanently moved from maven repository. Non re-solved dependencies 1) groupId - org.wso2.carbon artifactId - org.wso2.carbon.integration.common.extensions version - 4.3.0 2) groupId - org.wso2.carbon artifactId - org.wso2.carbon.integration.common.admin.client version - 4.3.0 So can you please tell how can I solve the failed dependencies which are non re-solved and what are the dependencies I need to add in POM file to overcome this failure.I have attached our POM file also. On Mon, Mar 16, 2015 at 5:28 PM, Rajeenthini Satkunam rajeenth...@wso2.com wrote: Hi, Noted. On Mon, Mar 16, 2015 at 1:29 PM, Elilmatha Sivanesan elilma...@wso2.com wrote: Hi Dinithi and Rajeenthini, Can you please check on this an give the pull request to https://github.com/wso2/esb-connectors . Thank you. On Wed, Feb 25, 2015 at 10:56 PM, Dinithi De Silva dinit...@wso2.com wrote: Hi Elil, AFAIK some of the dependencies are moved to a new location from the old location. That must be the reason for the test failure. I'll check what are the dependencies missing and inform you soon. Thanks On Wed, Feb 25, 2015 at 5:17 PM, Elilmatha Sivanesan elilma...@wso2.com wrote: Hi Dinithi and Rajeenthini, I'm testing ToodleDo Connector[1] and all the tests are failed, and when i test mannually I'm unable to upload the ToodleDo.zip error log [2] Your opinions are appreciated. [1] https://github.com/dinithiviranga/ToodledoESBConnector [2] https://docs.google.com/a/wso2.com/document/d/1YA-rg9WIbwb5bsh3LoCdfLdwVmA4A1zQ_pmAgEc0RlA/edit https://docs.google.com/a/wso2.com/document/d/1YA-rg9WIbwb5bsh3LoCdfLdwVmA4A1zQ_pmAgEc0RlA/edit Thank you. -- *S.Elilmatha* Associate Software Engineer, WSO2 Inc.; http://wso2.com lean.enterprise.middleware Mobile 0779842221. -- *Dinithi De Silva* Associate Software Engineer, WSO2 Inc. m:+94716667655 | e:dinit...@wso2.com | w: www.wso2.com | a: #20, Palm Grove, Colombo 03 -- *S.Elilmatha* Associate Software Engineer, WSO2 Inc.; http://wso2.com lean.enterprise.middleware Mobile 0779842221. -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com rajeenth...@wso2.com* *M :+94770832823 %2B94770832823 * -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com rajeenth...@wso2.com* *M :+94770832823 %2B94770832823 * ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev -- *Tharik Kanaka* | Associate Software Engineer WSO2, Inc |#20, Palm Grove, Colombo 03, Sri Lanka Email: tha...@wso2.com | Web: www.wso2.com -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com rajeenth...@wso2.com* *M :+94770832823 * ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Code Review on ToodleDo Connector
Hi, Noted. On Mon, Mar 16, 2015 at 1:29 PM, Elilmatha Sivanesan elilma...@wso2.com wrote: Hi Dinithi and Rajeenthini, Can you please check on this an give the pull request to https://github.com/wso2/esb-connectors . Thank you. On Wed, Feb 25, 2015 at 10:56 PM, Dinithi De Silva dinit...@wso2.com wrote: Hi Elil, AFAIK some of the dependencies are moved to a new location from the old location. That must be the reason for the test failure. I'll check what are the dependencies missing and inform you soon. Thanks On Wed, Feb 25, 2015 at 5:17 PM, Elilmatha Sivanesan elilma...@wso2.com wrote: Hi Dinithi and Rajeenthini, I'm testing ToodleDo Connector[1] and all the tests are failed, and when i test mannually I'm unable to upload the ToodleDo.zip error log [2] Your opinions are appreciated. [1] https://github.com/dinithiviranga/ToodledoESBConnector [2] https://docs.google.com/a/wso2.com/document/d/1YA-rg9WIbwb5bsh3LoCdfLdwVmA4A1zQ_pmAgEc0RlA/edit https://docs.google.com/a/wso2.com/document/d/1YA-rg9WIbwb5bsh3LoCdfLdwVmA4A1zQ_pmAgEc0RlA/edit Thank you. -- *S.Elilmatha* Associate Software Engineer, WSO2 Inc.; http://wso2.com lean.enterprise.middleware Mobile 0779842221. -- *Dinithi De Silva* Associate Software Engineer, WSO2 Inc. m:+94716667655 | e:dinit...@wso2.com | w: www.wso2.com | a: #20, Palm Grove, Colombo 03 -- *S.Elilmatha* Associate Software Engineer, WSO2 Inc.; http://wso2.com lean.enterprise.middleware Mobile 0779842221. -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com rajeenth...@wso2.com* *M :+94770832823 * ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
[Dev] ERROR {org.wso2.carbon.registry.core.jdbc.dao.JDBCResourceDAO} - Failed to add properties to the resource
//7sUO0IGn0ORycddHhoo0aSdnnxGf9V tREaqKm9dJ7Yn7kQHjo2eryMgYxtr/Z5Il5F+wIDAQABo2AwXjARBglghkgBhvhCAQEEBAMCBkAw DgYDVR0PAQH/BAQDAgTwMB8GA1UdIwQYMBaAFDugITflTCfsWyNLTXDl7cMDUKuuMBgGA1UdEQQR MA+BDW1hbGxhQHN1bi5jb20wDQYJKoZIhvcNAQEEBQADQQB/6DOB6sRqCZu2OenM9eQR0gube85e nTTxU4a7x1naFxzYXK1iQ1vMARKMjDb19QEJIEJKZlDK4uS7yMlf1nFS /X509Certificate /X509Data /KeyInfo /KeyDescriptor KeyDescriptor use=encryption KeyInfo xmlns=http://www.w3.org/2000/09/xmldsig#; X509Data X509Certificate MIICTDCCAfagAwIBAgICBo8wDQYJKoZIhvcNAQEEBQAwgZIxCzAJBgNVBAYTAlVTMRMwEQYDVQQI EwpDYWxpZm9ybmlhMRQwEgYDVQQHEwtTYW50YSBDbGFyYTEeMBwGA1UEChMVU3VuIE1pY3Jvc3lz dGVtcyBJbmMuMRowGAYDVQQLExFJZGVudGl0eSBTZXJ2aWNlczEcMBoGA1UEAxMTQ2VydGlmaWNh dGUgTWFuYWdlcjAeFw0wNjExMDcyMzU2MTdaFw0xMDA4MDMyMzU2MTdaMCMxITAfBgNVBAMTGGxv YWRiYWxhbmNlci05LnNpcm9lLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAw574iRU6 HsSO4LXW/OGTXyfsbGv6XRVOoy3v+J1pZ51KKejcDjDJXNkKGn3/356AwIaqbcymWd59T0zSqYfR Hn+45uyjYxRBmVJseLpVnOXLub9jsjULfGx0yjH4w+KsZSZCXatoCHbj/RJtkzuZY6V9to/hkH3S InQB4a3UAgMCAwEAAaNgMF4wEQYJYIZIAYb4QgEBBAQDAgZAMA4GA1UdDwEB/wQEAwIE8DAfBgNV HSMEGDAWgBQ7oCE35Uwn7FsjS01w5e3DA1CrrjAYBgNVHREEETAPgQ1tYWxsYUBzdW4uY29tMA0G CSqGSIb3DQEBBAUAA0EAMlbfBg/ff0Xkv4DOR5LEqmfTZKqgdlD81cXynfzlF7XfnOqI6hPIA90I x5Ql0ejivIJAYcMGUyA+/YwJg2FGoA== /X509Certificate /X509Data /KeyInfo EncryptionMethod Algorithm= https://www.w3.org/2001/04/xmlenc#aes128-cbc; KeySize xmlns=https://www.w3.org/2001/04/xmlenc#;128/KeySize /EncryptionMethod /KeyDescriptor SingleLogoutService Binding=urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect Location=https://LoadBalancer-9.siroe.com:3443/federation/ SPSloRedirect/metaAlias/sp ResponseLocation=https://LoadBalancer-9.siroe.com:3443/ federation/SPSloRedirect/metaAlias/sp/ SingleLogoutService Binding=urn:oasis:names:tc:SAML:2.0:bindings:SOAP Location=https://LoadBalancer-9.siroe.com:3443/ federation/SPSloSoap/metaAlias/sp/ ManageNameIDService Binding=urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect Location=https://LoadBalancer-9.siroe.com:3443/federation/ SPMniRedirect/metaAlias/sp ResponseLocation=https://LoadBalancer-9.siroe.com:3443/ federation/SPMniRedirect/metaAlias/sp/ ManageNameIDService Binding=urn:oasis:names:tc:SAML:2.0:bindings:SOAP Location=https://LoadBalancer-9.siroe.com:3443/ federation/SPMniSoap/metaAlias/sp ResponseLocation=https://LoadBalancer-9.siroe.com:3443/ federation/SPMniSoap/metaAlias/sp/ NameIDFormat urn:oasis:names:tc:SAML:2.0:nameid-format:persistent /NameIDFormat NameIDFormat urn:oasis:names:tc:SAML:2.0:nameid-format:transient /NameIDFormat AssertionConsumerService isDefault=true index=0 Binding=urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact Location=https://LoadBalancer-9.siroe.com:3443/ federation/Consumer/metaAlias/sp/ AssertionConsumerService index=1 Binding=urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST Location=https://LoadBalancer-9.siroe.com:3443/ federation/Consumer/metaAlias/sp/ /SPSSODescriptor testtrue/test /EntityDescriptor Ideally I can understand the problem that the database column size is not enough for what I have uploaded but I have tried with the file contains few data it worked properly. Can you please anyone help me to overcome this error and give me some suggestions to solve this issue that I am facing now. -- *Thank You.* *Rajeenthini Satkunam* *Associate Software Engineer | WSO2* *E:rajeenth...@wso2.com rajeenth...@wso2.com* *M :+94770832823 * ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev