On Sun, Aug 12, 2012 at 7:50 PM, sasinda rukshan <[email protected]> wrote: > Hi > Thanks for pointing out. > Do we have to unzip a distribution each time an automatic build runs?
Yes. > > ... > <phase>pre-integration-test</phase> > <goals> > > <goal>unpack</goal> > </goals> > ... > > Cant we have an already unpacked one in the Jenkins server? It's a matter of test isolation, it's way too slow to use a new instance for each test and it's going to be a real mess between tests which are all seting up the instance the way they need so we decided to use project as granularity. > Any way not a problem for me since Jenkins unzips it ;-). Not Jenkins, Maven. > > Thanks. > > > On Fri, Aug 10, 2012 at 12:53 PM, Thomas Mortagne <[email protected] >> wrote: > >> On Thu, Aug 9, 2012 at 2:13 PM, sasinda rukshan >> <[email protected]> wrote: >> > Hi, >> > I checked executing xwiki from the XWiki Executor in my local machine. >> > Cool its working ! :-) >> > >> > System.setProperty("xwikiExecutionDirectory","D:\\Xwiki-server"); >> > XWikiExecutor executor=new XWikiExecutor(0); >> > executor.start(); >> > >> > Just need a unique index for Android project with a jetty deployment. >> ;-). >> >> You should not provide the xwikiExecutionDirectory in java. You could >> do the same as in >> >> https://github.com/xwiki/xwiki-enterprise/blob/master/xwiki-enterprise-test/pom.xml#L93 >> and >> https://github.com/xwiki/xwiki-enterprise/blob/master/xwiki-enterprise-test/pom.xml#L172 >> . >> All test projects in >> https://github.com/xwiki/xwiki-enterprise/blob/master/xwiki-enterprise-test >> unzip the jetty/hsqldb distribution and set various system properties >> all that in maven before executing the first line of java. >> >> > >> > Thanks. >> > Regards. >> > >> > On Thu, Aug 9, 2012 at 2:08 PM, sasinda rukshan < >> [email protected]> >> > wrote: >> >> >> >> Hi, >> >> Thanks >> >> All test modules need not be starting and shutting down a Xwiki >> instance. >> >> I will write two modules which set up server fixture for all test >> modules >> >> (rest-tests, core-tests, instrumentation-tests) and shut down the >> server at >> >> completion of running all test modules. >> >> Small issue though is server may not shutdown , because modules are >> >> skipped by maven build when a test module fails. >> >> >> >> I'll have to write a separate J2SE module anyway, because the jenkins >> >> server's file system cannot be directly accessed by the emulator. >> >> >> >> Thanks. >> >> Best Regards. >> >> Sasinda Rukshan. >> >> >> >> >> >> On Wed, Aug 8, 2012 at 1:32 PM, Thomas Mortagne >> >> <[email protected]> wrote: >> >>> >> >>> On Wed, Aug 8, 2012 at 5:40 AM, sasinda rukshan >> >>> <[email protected]> wrote: >> >>> > Hi , >> >>> > thnks a lot. >> >>> > I checked the earlier android test code. It has not call to >> >>> > startXWiki() neither >> >>> > refers a XWikiExecutor. >> >>> > Any way all 3 test modules just need one fresh instance started. >> Don't >> >>> > need >> >>> > an XWiki instance started for each module. >> >>> > But easiest way is to do it for each module. >> >>> >> >>> Yes. >> >>> >> >>> > >> >>> > Chamika has used local host. >> >>> >> >>> I actually don't have much idea yet how those tests were supposed to >> >>> work. I can assure you there is no permanent running XWiki on this >> >>> jenkins agent and never was. I actually tough Chamika was using >> >>> xwiki.org (which seems to be the case for other tests) since he told >> >>> me he did not had time to setup the test to start a local instance of >> >>> XWiki like XE test are doing. Since the test were passing I did not >> >>> dug more. >> >>> >> >>> > This is the properties file for tests >> >>> > >> >>> > >> https://github.com/xwiki-contrib/android-client/commit/191c1cd1dd5db05622a881cf2f8e93db811f3133#diff-18 >> >>> > >> >>> > see the property: public static final String ATTACHMENT_NAME = >> >>> > "a.png"; >> >>> > >> >>> > The server instance needs an attachment with name a.png in page >> >>> > test2. >> >>> > We can't achieve it in the setup because to achieve it we have to use >> >>> > the >> >>> > addAttachment() method which itself is one of the methods that need >> to >> >>> > be >> >>> > tested. >> >>> >> >>> You have two solutions here: >> >>> * it's not a big deal to use addAttachment() IMO. All it means is that >> >>> if addAttachment() has an issue several tests will fail instead of >> >>> one but we want everything to work anyway. addAttachment() is tested >> >>> several times instead of one basically. I would go for this one. >> >>> * you can always bypass addAttachment() and directly use REST protocol >> >>> in your test setup to attach the file like most tests do in >> >>> >> >>> >> https://github.com/xwiki/xwiki-enterprise/tree/master/xwiki-enterprise-test >> >>> >> >>> > >> >>> > Best Regards >> >>> > Sasinda. >> >>> > >> >>> > On Tue, Aug 7, 2012 at 12:52 PM, Thomas Mortagne >> >>> > <[email protected]>wrote: >> >>> > >> >>> >> On Tue, Aug 7, 2012 at 4:33 AM, sasinda rukshan >> >>> >> <[email protected]> wrote: >> >>> >> > Hi Thomas, >> >>> >> >>>I restarted it and it seems ok now. >> >>> >> > Thanks a lot. >> >>> >> > Instrumentation tests that check the activities are running ok. >> >>> >> > (XWiki Android Instrumentation >> >>> >> > Tests< >> >>> >> >> >>> >> >> http://ci.xwiki.org/job/xwiki-android-client/216/org.xwiki.android$xwiki-android-tests-instrumentation/ >> >>> >> > >> >>> >> > ) >> >>> >> > >> >>> >> > I disabled the base rest api tests (xwiki-android-test-rest). I'll >> >>> >> > enable >> >>> >> > them in the next commit. >> >>> >> > There should be a local xwiki test instance in jenkins server as >> >>> >> > well. >> >>> >> Can >> >>> >> > you tell me how to access it. >> >>> >> >> >>> >> Actually there is none. What we do is that in all the tests that >> needs >> >>> >> an instance of XWiki we start XWiki before and stop it after (before >> >>> >> and after the whole test suite not for each test otherwise it would >> >>> >> way too slow) to be sure to have a clean instance of XWiki every >> time >> >>> >> and to not require anything in order to execute the test (for >> example >> >>> >> you can build the whole XE with test anywhere as long as you have >> >>> >> maven and Firefox installed). >> >>> >> >> >>> >> In "desktop" integration test what is taking care of starting and >> >>> >> stopping XE instance from the tests is >> >>> >> >> >>> >> >> >>> >> >> https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-test/src/main/java/org/xwiki/test/integration/XWikiExecutor.java >> >>> >> through >> >>> >> >> >>> >> >> https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-test/src/main/java/org/xwiki/test/integration/XWikiExecutorSuite.java >> >>> >> . >> >>> >> >> >>> >> > Tried http://ci.xwiki.org:8080. Since the test properties are >> >>> >> > directing >> >>> >> to >> >>> >> > a local server instance 10.0.2.2:8080 it should be there. >> >>> >> > >> >>> >> > We will be running tests bottom up. i.e. low lvl rest API --> >> Rest >> >>> >> > API >> >>> >> in >> >>> >> > RAL --> application layer UI components. And RAL tests will use >> low >> >>> >> > lvl >> >>> >> > rest API to achieve its pre-conditions and do cleanup after tests. >> >>> >> > If low >> >>> >> > level fails testing highlvl ones are not meaningful if they depend >> >>> >> > on the >> >>> >> > components that failed. ;-). >> >>> >> > >> >>> >> > Best Regards. >> >>> >> > Sasinda. >> >>> >> > >> >>> >> > >> >>> >> > >> >>> >> >> >> >>> >> >> >> >>> >> >> On Mon, Aug 6, 2012 at 1:00 PM, Thomas Mortagne < >> >>> >> [email protected] >> >>> >> >> > wrote: >> >>> >> >> >> >>> >> >>> On Mon, Aug 6, 2012 at 9:12 AM, Thomas Mortagne >> >>> >> >>> <[email protected]> wrote: >> >>> >> >>> > On Mon, Aug 6, 2012 at 9:10 AM, Thomas Mortagne >> >>> >> >>> > <[email protected]> wrote: >> >>> >> >>> >> On Mon, Aug 6, 2012 at 8:57 AM, Thomas Mortagne >> >>> >> >>> >> <[email protected]> wrote: >> >>> >> >>> >>> On Sun, Aug 5, 2012 at 5:42 PM, sasinda rukshan >> >>> >> >>> >>> <[email protected]> wrote: >> >>> >> >>> >>>> Hi Thomas, >> >>> >> >>> >>>> :-) >> >>> >> >>> >>>> Also still we cannot ignore failed tests in maven android >> >>> >> >>> >>>> plugin. >> >>> >> If >> >>> >> >>> a test >> >>> >> >>> >>>> fails we get Build Failure as result. >> >>> >> >>> >>> >> >>> >> >>> >>> Well that's the whole point, not sure why you want to ignore >> >>> >> failing >> >>> >> >>> tests. >> >>> >> >>> >>> >> >>> >> >>> >>>> http://code.google.com/p/robotium/issues/detail?id=130 >> >>> >> >>> >>>> >> >>> >> >>> >>>>> Need an AVD / Device connected to Jenkins to >> >>> >> >>> >>>> run the tests. >> >>> >> >>> >>>> I think you just have to download android sdk to the >> jenkins >> >>> >> server >> >>> >> >>> and use >> >>> >> >>> >>>> avd-manager to start up an avd in it. >> >>> >> >>> >>>> Not urgent ;-). >> >>> >> >>> >> >> >>> >> >>> >> Well thing is there is an AVD running and always have (since >> it >> >>> >> >>> >> was >> >>> >> >>> >> required by previous tests) so I don't understand exactly >> >>> >> >>> >> what's >> >>> >> >>> >> wrong. >> >>> >> >>> > >> >>> >> >>> > Here is what I have in ps aux: >> >>> >> >>> > >> >>> >> >>> > emulator -avd test-2.1 -noaudio -no-window -wipe-data >> >>> >> >>> >> >>> >> >>> Looks like it was not in a very good state actually, I restarted >> >>> >> >>> it >> >>> >> >>> and it seems ok now. >> >>> >> >>> >> >>> >> >>> > >> >>> >> >>> >> >> >>> >> >>> >>>> >> >>> >> >>> >>>> Still writing tests for core module. >> >>> >> >>> >>>> >> >>> >> >>> >>>> Regards. >> >>> >> >>> >>>> Sasinda Rukshan. >> >>> >> >>> >>>> >> >>> >> >>> >>>> On Sun, Aug 5, 2012 at 8:49 PM, Thomas Mortagne < >> >>> >> >>> [email protected]> >> >>> >> >>> >>>> wrote: >> >>> >> >>> >>>>> >> >>> >> >>> >>>>> On Sun, Aug 5, 2012 at 4:46 PM, sasinda rukshan >> >>> >> >>> >>>>> <[email protected]> wrote: >> >>> >> >>> >>>>> > Hi Thomas, >> >>> >> >>> >>>>> > Thnx. >> >>> >> >>> >>>>> > >> >>> >> >>> >>>>> >>No, you need to start one (which is not very hard with >> >>> >> >>> jetty/hsqldb >> >>> >> >>> >>>>> >>distribution) >> >>> >> >>> >>>>> > Well what about the earlier project's test server. It >> >>> >> >>> >>>>> > should >> >>> >> have >> >>> >> >>> had >> >>> >> >>> >>>>> > its >> >>> >> >>> >>>>> > test environment setup properly. Shouldn't it?. >> >>> >> >>> >>>>> >> >>> >> >>> >>>>> Yes it should have but Chamika did not had time to finish. >> >>> >> >>> >>>>> >> >>> >> >>> >>>>> > >> >>> >> >>> >>>>> > >> >>> >> >>> >>>>> >>(but then you have the risk that you don't >> >>> >> >>> >>>>> >>have the exact same behavior) when you start the tests. >> >>> >> >>> >>>>> >> You can >> >>> >> >>> look >> >>> >> >>> >>>>> >>at how >> >>> >> >>> >>>>> >> >> >>> >> >>> >>>>> >> >> >>> >> >>> >> >>> >> >> >>> >> >> https://github.com/xwiki/xwiki-enterprise/tree/master/xwiki-enterprise-test/xwiki-enterprise-test-rest >> >>> >> >>> >>>>> >>does it for example. >> >>> >> >>> >>>>> > Thanks. I'll make the setup, tear down methods to >> achieve >> >>> >> >>> preconditions >> >>> >> >>> >>>>> > and >> >>> >> >>> >>>>> > cleanup. >> >>> >> >>> >>>>> > >> >>> >> >>> >>>>> > Best Regards. >> >>> >> >>> >>>>> > >> >>> >> >>> >>>>> > On Sun, Aug 5, 2012 at 7:14 PM, Thomas Mortagne >> >>> >> >>> >>>>> > <[email protected]> >> >>> >> >>> >>>>> > wrote: >> >>> >> >>> >>>>> >> >> >>> >> >>> >>>>> >> On Sun, Aug 5, 2012 at 11:42 AM, sasinda rukshan >> >>> >> >>> >>>>> >> <[email protected]> wrote: >> >>> >> >>> >>>>> >> > Hi Thomas, >> >>> >> >>> >>>>> >> > >> >>> >> >>> >>>>> >> > >> >>> >> >>> >>>>> >> > This is the latest result for >> >>> >> >>> xwiki-android-tests-instrumentation >> >>> >> >>> >>>>> >> > (The >> >>> >> >>> >>>>> >> > UI stress testing test module) >> >>> >> >>> >>>>> >> > >> >>> >> >>> >>>>> >> > >> >>> >> >>> >>>>> >> > >> >>> >> >>> >>>>> >> > [INFO] *Found 0 devices connected with the Android >> >>> >> >>> >>>>> >> > Debug >> >>> >> >>> Bridge* >> >>> >> >>> >>>>> >> > mojoFailed >> >>> >> >>> >>>>> >> > >> >>> >> >>> >>>>> >> > >> >>> >> >>> >> >>> >> >> >>> >> >> com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.3.0(default-internal-pre-integration-test) >> >>> >> >>> >>>>> >> > projectFailed >> >>> >> >>> >>>>> >> > >> >>> >> >>> >> org.xwiki.android:xwiki-android-tests-instrumentation:1.0-SNAPSHOT >> >>> >> >>> >>>>> >> > sessionEnded >> >>> >> >>> >>>>> >> > >> >>> >> >>> >>>>> >> > >> >>> >> >>> >>>>> >> > Need an AVD / Device connected to Jenkins to run the >> >>> >> >>> >>>>> >> > tests. >> >>> >> >>> >>>>> >> >> >>> >> >>> >>>>> >> Will look at it. >> >>> >> >>> >>>>> >> >> >>> >> >>> >>>>> >> > >> >>> >> >>> >>>>> >> > Also the ....test-rest will have failures if some >> >>> >> >>> preconditions are >> >>> >> >>> >>>>> >> > not >> >>> >> >>> >>>>> >> > met. (like having a page named Blog/test2 ) >> >>> >> >>> >>>>> >> > >> >>> >> >>> >>>>> >> > Is there a testing server instance running on the >> >>> >> >>> >>>>> >> > Jenkins >> >>> >> >>> server?. >> >>> >> >>> >>>>> >> >> >>> >> >>> >>>>> >> No, you need to start one (which is not very hard with >> >>> >> >>> jetty/hsqldb >> >>> >> >>> >>>>> >> distribution) or mock one (but then you have the risk >> >>> >> >>> >>>>> >> that you >> >>> >> >>> don't >> >>> >> >>> >>>>> >> have the exact same behavior) when you start the tests. >> >>> >> >>> >>>>> >> You >> >>> >> can >> >>> >> >>> look >> >>> >> >>> >>>>> >> at how >> >>> >> >>> >>>>> >> >> >>> >> >>> >>>>> >> >> >>> >> >>> >> >>> >> >> >>> >> >> https://github.com/xwiki/xwiki-enterprise/tree/master/xwiki-enterprise-test/xwiki-enterprise-test-rest >> >>> >> >>> >>>>> >> does it for example. >> >>> >> >>> >> >>> >> >> >> >>> >> > _______________________________________________ >> >>> >> > devs mailing list >> >>> >> > [email protected] >> >>> >> > http://lists.xwiki.org/mailman/listinfo/devs >> >>> >> >> >>> >> >> >>> >> >> >>> >> -- >> >>> >> Thomas Mortagne >> >>> >> >> >>> > _______________________________________________ >> >>> > devs mailing list >> >>> > [email protected] >> >>> > http://lists.xwiki.org/mailman/listinfo/devs >> >>> >> >>> >> >>> >> >>> -- >> >>> Thomas Mortagne >> >> >> >> >> > >> >> >> >> -- >> Thomas Mortagne >> > _______________________________________________ > devs mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/devs -- Thomas Mortagne _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

