|
Nguyen Hoang Thanh Duc created OFBIZ-4872:
--------------------------------------------- Summary: Functional Test Implementation Key: OFBIZ-4872 URL: https://issues.apache.org/jira/browse/OFBIZ-4872 Project: OFBiz Issue Type: Improvement Components: framework Reporter: Nguyen Hoang Thanh Duc Priority: Trivial This issue covers progressively implementation of the functional test for the OFBiz. The implementation relies mainly on the WebDriver, and assist developers with ease to add/remove/edit test cases and obtain a complete test report then. For more information: https://cwiki.apache.org/confluence/display/OFBIZ/Implementation+Documentation -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
[ https://issues.apache.org/jira/browse/OFBIZ-4872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13276641#comment-13276641 ] Erwan de FERRIERES commented on OFBIZ-4872: ------------------------------------------- > Difficulties: > decide which approach is easy to maintain and extend: go by page(one page contain many test cases) or go by case(one case cover a single scenario). The first approach requires a few huge classes. The second approach requires great pool of tiny classes, yet easy to distribute cases. Hi, I prefer the 2nd approach: working case by case, with reusable components > Functional Test Implementation > ------------------------------ > > Key: OFBIZ-4872 > URL: https://issues.apache.org/jira/browse/OFBIZ-4872 > Project: OFBiz > Issue Type: Improvement > Components: framework > Reporter: Nguyen Hoang Thanh Duc > Priority: Trivial > Labels: gsoc2012, webdriver > Original Estimate: 2,184h > Remaining Estimate: 2,184h > > This issue covers progressively implementation of the functional test for the OFBiz. > The implementation relies mainly on the WebDriver, and assist developers with ease to add/remove/edit test cases and obtain a complete test report then. > For more information: https://cwiki.apache.org/confluence/display/OFBIZ/Implementation+Documentation -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4872?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Erwan de FERRIERES updated OFBIZ-4872: -------------------------------------- Attachment: OFBIZ-4872.patch > Functional Test Implementation > ------------------------------ > > Key: OFBIZ-4872 > URL: https://issues.apache.org/jira/browse/OFBIZ-4872 > Project: OFBiz > Issue Type: Improvement > Components: framework > Reporter: Nguyen Hoang Thanh Duc > Priority: Trivial > Labels: gsoc2012, webdriver > Attachments: OFBIZ-4872.patch > > Original Estimate: 2,184h > Remaining Estimate: 2,184h > > This issue covers progressively implementation of the functional test for the OFBiz. > The implementation relies mainly on the WebDriver, and assist developers with ease to add/remove/edit test cases and obtain a complete test report then. > For more information: https://cwiki.apache.org/confluence/display/OFBIZ/Implementation+Documentation -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13471821#comment-13471821 ] Erwan de FERRIERES commented on OFBIZ-4872: ------------------------------------------- Steps to test: * apply patch * run ./ant download-webdriver load-demo --> OFBiz is now loaded and ready to run the tests * run ./ant run-webdriver > Functional Test Implementation > ------------------------------ > > Key: OFBIZ-4872 > URL: https://issues.apache.org/jira/browse/OFBIZ-4872 > Project: OFBiz > Issue Type: Improvement > Components: framework > Reporter: Nguyen Hoang Thanh Duc > Priority: Trivial > Labels: gsoc2012, webdriver > Attachments: OFBIZ-4872.patch > > Original Estimate: 2,184h > Remaining Estimate: 2,184h > > This issue covers progressively implementation of the functional test for the OFBiz. > The implementation relies mainly on the WebDriver, and assist developers with ease to add/remove/edit test cases and obtain a complete test report then. > For more information: https://cwiki.apache.org/confluence/display/OFBIZ/Implementation+Documentation -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13494692#comment-13494692 ] Jacques Le Roux commented on OFBIZ-4872: ---------------------------------------- I tried it and got BUILD SUCCESSFUL Total time: 1 minute 25 seconds butI saw some errors in log, normal? {code} [java] 2012-11-10 14:53:26,437 (main) [ ServiceDispatcher.java:86 :INFO ] [ServiceDispatcher] : Creating new instance. [java] 2012-11-10 14:53:26,437 (main) [ ServiceGroupReader.java:89 :INFO ] Loaded [ 1] Group definitions from file:/D:/workspace/ofbizClean/framework/common/servicedef/groups_test.xml [java] 2012-11-10 14:53:26,437 (main) [ ServiceGroupReader.java:89 :INFO ] Loaded [ 4] Group definitions from file:/D:/workspace/ofbizClean/framework/entityext/servicedef/groups.xml [java] 2012-11-10 14:53:26,437 (main) [ ServiceGroupReader.java:89 :INFO ] Loaded [ 2] Group definitions from file:/D:/workspace/ofbizClean/applications/workeffort/servicedef/service_groups.xml [java] 2012-11-10 14:53:26,437 (main) [ ServiceGroupReader.java:89 :INFO ] Loaded [ 4] Group definitions from file:/D:/workspace/ofbizClean/applications/accounting/servicedef/groups.xml [java] 2012-11-10 14:53:26,437 (main) [ ServiceDispatcher.java:172:INFO ] Registering dispatcher: entity-test-LGte4zSVvS [java] 2012-11-10 14:53:26,437 (main) [ ServiceContainer.java:93 :INFO ] Created new dispatcher [entity-test-LGte4zSVvS] (main) [java] 2012-11-10 14:53:26,437 (main) [ ServiceDispatcher.java:172:INFO ] Registering dispatcher: test-dispatcher-LGte4zSVvS [java] 2012-11-10 14:53:26,437 (main) [ ServiceContainer.java:93 :INFO ] Created new dispatcher [test-dispatcher-LGte4zSVvS] (main) [java] 2012-11-10 14:53:26,453 (main) [ ModelTestSuite.java:115:ERROR] [java] ---- exception report ---------------------------------------------------------- [java] Unable to load test suite class : org.ofbiz.base.test.webdriver.CatalogAppFunctionalTest [java] Exception: java.lang.ClassNotFoundException [java] Message: org.ofbiz.base.test.webdriver.CatalogAppFunctionalTest [java] ---- stack trace --------------------------------------------------------------- [java] java.lang.ClassNotFoundException: org.ofbiz.base.test.webdriver.CatalogAppFunctionalTest [java] java.net.URLClassLoader$1.run(URLClassLoader.java:202) [java] java.security.AccessController.doPrivileged(Native Method) [java] java.net.URLClassLoader.findClass(URLClassLoader.java:190) [java] java.lang.ClassLoader.loadClass(ClassLoader.java:307) [java] java.lang.ClassLoader.loadClass(ClassLoader.java:248) [java] java.lang.Class.forName0(Native Method) [java] java.lang.Class.forName(Class.java:169) [java] org.ofbiz.base.util.ObjectType.loadClass(ObjectType.java:113) [java] org.ofbiz.base.util.ObjectType.loadClass(ObjectType.java:70) [java] org.ofbiz.testtools.ModelTestSuite.parseTestElement(ModelTestSuite.java:100) [java] org.ofbiz.testtools.ModelTestSuite.<init>(ModelTestSuite.java:85) [java] org.ofbiz.testtools.JunitSuiteWrapper.processResourceHandler(JunitSuiteWrapper.java:49) [java] org.ofbiz.testtools.JunitSuiteWrapper.<init>(JunitSuiteWrapper.java:61) [java] org.ofbiz.testtools.FunctionalTestContainer.start(FunctionalTestContainer.java:111) [java] org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:237) [java] org.ofbiz.base.start.Start.startStartLoaders(Start.java:324) [java] org.ofbiz.base.start.Start.start(Start.java:360) [java] org.ofbiz.base.start.Start.main(Start.java:120) [java] -------------------------------------------------------------------------------- {code} > Functional Test Implementation > ------------------------------ > > Key: OFBIZ-4872 > URL: https://issues.apache.org/jira/browse/OFBIZ-4872 > Project: OFBiz > Issue Type: Improvement > Components: framework > Reporter: Nguyen Hoang Thanh Duc > Priority: Trivial > Labels: gsoc2012, webdriver > Attachments: OFBIZ-4872.patch > > Original Estimate: 2,184h > Remaining Estimate: 2,184h > > This issue covers progressively implementation of the functional test for the OFBiz. > The implementation relies mainly on the WebDriver, and assist developers with ease to add/remove/edit test cases and obtain a complete test report then. > For more information: https://cwiki.apache.org/confluence/display/OFBIZ/Implementation+Documentation -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13494692#comment-13494692 ] Jacques Le Roux edited comment on OFBIZ-4872 at 11/10/12 2:00 PM: ------------------------------------------------------------------ == MISSED SOME CHANGES IN COMMENT == I tried it and got BUILD SUCCESSFUL Total time: 1 minute 25 seconds butI saw this error in log, normal? {code} [java] 2012-11-10 14:53:26,437 (main) [ ServiceDispatcher.java:86 :INFO ] [ServiceDispatcher] : Creating new instance. [java] 2012-11-10 14:53:26,437 (main) [ ServiceGroupReader.java:89 :INFO ] Loaded [ 1] Group definitions from file:/D:/workspace/ofbizClean/framework/common/servicedef/groups_test.xml [java] 2012-11-10 14:53:26,437 (main) [ ServiceGroupReader.java:89 :INFO ] Loaded [ 4] Group definitions from file:/D:/workspace/ofbizClean/framework/entityext/servicedef/groups.xml [java] 2012-11-10 14:53:26,437 (main) [ ServiceGroupReader.java:89 :INFO ] Loaded [ 2] Group definitions from file:/D:/workspace/ofbizClean/applications/workeffort/servicedef/service_groups.xml [java] 2012-11-10 14:53:26,437 (main) [ ServiceGroupReader.java:89 :INFO ] Loaded [ 4] Group definitions from file:/D:/workspace/ofbizClean/applications/accounting/servicedef/groups.xml [java] 2012-11-10 14:53:26,437 (main) [ ServiceDispatcher.java:172:INFO ] Registering dispatcher: entity-test-LGte4zSVvS [java] 2012-11-10 14:53:26,437 (main) [ ServiceContainer.java:93 :INFO ] Created new dispatcher [entity-test-LGte4zSVvS] (main) [java] 2012-11-10 14:53:26,437 (main) [ ServiceDispatcher.java:172:INFO ] Registering dispatcher: test-dispatcher-LGte4zSVvS [java] 2012-11-10 14:53:26,437 (main) [ ServiceContainer.java:93 :INFO ] Created new dispatcher [test-dispatcher-LGte4zSVvS] (main) [java] 2012-11-10 14:53:26,453 (main) [ ModelTestSuite.java:115:ERROR] [java] ---- exception report ---------------------------------------------------------- [java] Unable to load test suite class : org.ofbiz.base.test.webdriver.CatalogAppFunctionalTest [java] Exception: java.lang.ClassNotFoundException [java] Message: org.ofbiz.base.test.webdriver.CatalogAppFunctionalTest [java] ---- stack trace --------------------------------------------------------------- [java] java.lang.ClassNotFoundException: org.ofbiz.base.test.webdriver.CatalogAppFunctionalTest [java] java.net.URLClassLoader$1.run(URLClassLoader.java:202) [java] java.security.AccessController.doPrivileged(Native Method) [java] java.net.URLClassLoader.findClass(URLClassLoader.java:190) [java] java.lang.ClassLoader.loadClass(ClassLoader.java:307) [java] java.lang.ClassLoader.loadClass(ClassLoader.java:248) [java] java.lang.Class.forName0(Native Method) [java] java.lang.Class.forName(Class.java:169) [java] org.ofbiz.base.util.ObjectType.loadClass(ObjectType.java:113) [java] org.ofbiz.base.util.ObjectType.loadClass(ObjectType.java:70) [java] org.ofbiz.testtools.ModelTestSuite.parseTestElement(ModelTestSuite.java:100) [java] org.ofbiz.testtools.ModelTestSuite.<init>(ModelTestSuite.java:85) [java] org.ofbiz.testtools.JunitSuiteWrapper.processResourceHandler(JunitSuiteWrapper.java:49) [java] org.ofbiz.testtools.JunitSuiteWrapper.<init>(JunitSuiteWrapper.java:61) [java] org.ofbiz.testtools.FunctionalTestContainer.start(FunctionalTestContainer.java:111) [java] org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:237) [java] org.ofbiz.base.start.Start.startStartLoaders(Start.java:324) [java] org.ofbiz.base.start.Start.start(Start.java:360) [java] org.ofbiz.base.start.Start.main(Start.java:120) [java] -------------------------------------------------------------------------------- {code} I also saw some warnings, and some rollbacks due to missing permission, like {code} java] ---- cause --------------------------------------------------------------------- java] Exception: org.ofbiz.service.ServiceAuthException java] Message: User authorization is required for this service: getInvoiceRunningTotal java] ---- stack trace --------------------------------------------------------------- java] org.ofbiz.service.ServiceAuthException: User authorization is required for this service: getInvoiceRunningTotal java] org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:341) java] org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:215) java] org.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:83) java] org.ofbiz.service.LocalDispatcher$runSync.call(Unknown Source) java] InvoiceReport.run(InvoiceReport.groovy:48) {code} Just to stay tuned ;) was (Author: jacques.le.roux): I tried it and got BUILD SUCCESSFUL Total time: 1 minute 25 seconds butI saw some errors in log, normal? {code} [java] 2012-11-10 14:53:26,437 (main) [ ServiceDispatcher.java:86 :INFO ] [ServiceDispatcher] : Creating new instance. [java] 2012-11-10 14:53:26,437 (main) [ ServiceGroupReader.java:89 :INFO ] Loaded [ 1] Group definitions from file:/D:/workspace/ofbizClean/framework/common/servicedef/groups_test.xml [java] 2012-11-10 14:53:26,437 (main) [ ServiceGroupReader.java:89 :INFO ] Loaded [ 4] Group definitions from file:/D:/workspace/ofbizClean/framework/entityext/servicedef/groups.xml [java] 2012-11-10 14:53:26,437 (main) [ ServiceGroupReader.java:89 :INFO ] Loaded [ 2] Group definitions from file:/D:/workspace/ofbizClean/applications/workeffort/servicedef/service_groups.xml [java] 2012-11-10 14:53:26,437 (main) [ ServiceGroupReader.java:89 :INFO ] Loaded [ 4] Group definitions from file:/D:/workspace/ofbizClean/applications/accounting/servicedef/groups.xml [java] 2012-11-10 14:53:26,437 (main) [ ServiceDispatcher.java:172:INFO ] Registering dispatcher: entity-test-LGte4zSVvS [java] 2012-11-10 14:53:26,437 (main) [ ServiceContainer.java:93 :INFO ] Created new dispatcher [entity-test-LGte4zSVvS] (main) [java] 2012-11-10 14:53:26,437 (main) [ ServiceDispatcher.java:172:INFO ] Registering dispatcher: test-dispatcher-LGte4zSVvS [java] 2012-11-10 14:53:26,437 (main) [ ServiceContainer.java:93 :INFO ] Created new dispatcher [test-dispatcher-LGte4zSVvS] (main) [java] 2012-11-10 14:53:26,453 (main) [ ModelTestSuite.java:115:ERROR] [java] ---- exception report ---------------------------------------------------------- [java] Unable to load test suite class : org.ofbiz.base.test.webdriver.CatalogAppFunctionalTest [java] Exception: java.lang.ClassNotFoundException [java] Message: org.ofbiz.base.test.webdriver.CatalogAppFunctionalTest [java] ---- stack trace --------------------------------------------------------------- [java] java.lang.ClassNotFoundException: org.ofbiz.base.test.webdriver.CatalogAppFunctionalTest [java] java.net.URLClassLoader$1.run(URLClassLoader.java:202) [java] java.security.AccessController.doPrivileged(Native Method) [java] java.net.URLClassLoader.findClass(URLClassLoader.java:190) [java] java.lang.ClassLoader.loadClass(ClassLoader.java:307) [java] java.lang.ClassLoader.loadClass(ClassLoader.java:248) [java] java.lang.Class.forName0(Native Method) [java] java.lang.Class.forName(Class.java:169) [java] org.ofbiz.base.util.ObjectType.loadClass(ObjectType.java:113) [java] org.ofbiz.base.util.ObjectType.loadClass(ObjectType.java:70) [java] org.ofbiz.testtools.ModelTestSuite.parseTestElement(ModelTestSuite.java:100) [java] org.ofbiz.testtools.ModelTestSuite.<init>(ModelTestSuite.java:85) [java] org.ofbiz.testtools.JunitSuiteWrapper.processResourceHandler(JunitSuiteWrapper.java:49) [java] org.ofbiz.testtools.JunitSuiteWrapper.<init>(JunitSuiteWrapper.java:61) [java] org.ofbiz.testtools.FunctionalTestContainer.start(FunctionalTestContainer.java:111) [java] org.ofbiz.base.container.ContainerLoader.start(ContainerLoader.java:237) [java] org.ofbiz.base.start.Start.startStartLoaders(Start.java:324) [java] org.ofbiz.base.start.Start.start(Start.java:360) [java] org.ofbiz.base.start.Start.main(Start.java:120) [java] -------------------------------------------------------------------------------- {code} > Functional Test Implementation > ------------------------------ > > Key: OFBIZ-4872 > URL: https://issues.apache.org/jira/browse/OFBIZ-4872 > Project: OFBiz > Issue Type: Improvement > Components: framework > Reporter: Nguyen Hoang Thanh Duc > Priority: Trivial > Labels: gsoc2012, webdriver > Attachments: OFBIZ-4872.patch > > Original Estimate: 2,184h > Remaining Estimate: 2,184h > > This issue covers progressively implementation of the functional test for the OFBiz. > The implementation relies mainly on the WebDriver, and assist developers with ease to add/remove/edit test cases and obtain a complete test report then. > For more information: https://cwiki.apache.org/confluence/display/OFBIZ/Implementation+Documentation -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13494881#comment-13494881 ] Erwan de FERRIERES commented on OFBIZ-4872: ------------------------------------------- Hi, yes, there is an error, as you found... in applications/product/testdef/functionaltests.xml, it should be <junit-test-suite class-name="org.ofbiz.product.test.webdriver.CatalogAppFunctionalTest"/> and not <junit-test-suite class-name="org.ofbiz.base.test.webdriver.CatalogAppFunctionalTest"/> I'm uploading the corrected patch. For the warnings, I have no answer at the moment. Cheers, > Functional Test Implementation > ------------------------------ > > Key: OFBIZ-4872 > URL: https://issues.apache.org/jira/browse/OFBIZ-4872 > Project: OFBiz > Issue Type: Improvement > Components: framework > Reporter: Nguyen Hoang Thanh Duc > Priority: Trivial > Labels: gsoc2012, webdriver > Attachments: OFBIZ-4872.patch > > Original Estimate: 2,184h > Remaining Estimate: 2,184h > > This issue covers progressively implementation of the functional test for the OFBiz. > The implementation relies mainly on the WebDriver, and assist developers with ease to add/remove/edit test cases and obtain a complete test report then. > For more information: https://cwiki.apache.org/confluence/display/OFBIZ/Implementation+Documentation -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4872?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Erwan de FERRIERES updated OFBIZ-4872: -------------------------------------- Attachment: OFBIZ-4872.patch > Functional Test Implementation > ------------------------------ > > Key: OFBIZ-4872 > URL: https://issues.apache.org/jira/browse/OFBIZ-4872 > Project: OFBiz > Issue Type: Improvement > Components: framework > Reporter: Nguyen Hoang Thanh Duc > Priority: Trivial > Labels: gsoc2012, webdriver > Attachments: OFBIZ-4872.patch, OFBIZ-4872.patch > > Original Estimate: 2,184h > Remaining Estimate: 2,184h > > This issue covers progressively implementation of the functional test for the OFBiz. > The implementation relies mainly on the WebDriver, and assist developers with ease to add/remove/edit test cases and obtain a complete test report then. > For more information: https://cwiki.apache.org/confluence/display/OFBIZ/Implementation+Documentation -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira |
|
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-4872?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Erwan de FERRIERES updated OFBIZ-4872: -------------------------------------- Attachment: OFBIZ-4872.patch newer version : no more tests in framework misisng license headers corrected file names corrected removed ant tasks in webdriver.xml to build.xml > Functional Test Implementation > ------------------------------ > > Key: OFBIZ-4872 > URL: https://issues.apache.org/jira/browse/OFBIZ-4872 > Project: OFBiz > Issue Type: Improvement > Components: framework > Reporter: Nguyen Hoang Thanh Duc > Priority: Trivial > Labels: gsoc2012, webdriver > Attachments: OFBIZ-4872.patch, OFBIZ-4872.patch, OFBIZ-4872.patch > > Original Estimate: 2,184h > Remaining Estimate: 2,184h > > This issue covers progressively implementation of the functional test for the OFBiz. > The implementation relies mainly on the WebDriver, and assist developers with ease to add/remove/edit test cases and obtain a complete test report then. > For more information: https://cwiki.apache.org/confluence/display/OFBIZ/Implementation+Documentation -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira |
| Free forum by Nabble | Edit this page |
