Changes for page Testing

Last modified by Vincent Massol on 2023/10/26 15:34

<
From version < 1.25 >
edited by VincentMassol
on 2007/10/02 13:12
To version < 2.1 >
edited by Vincent Massol
on 2008/06/01 15:49
>
Change comment: Added -DpatternMethod property explanations

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.VincentMassol
1 +xwiki:XWiki.VincentMassol
Content
... ... @@ -16,14 +16,14 @@
16 16  
17 17  * These are tests done from a running XWiki instance.
18 18  * We are using Selenium RC to perform functional tests for GUI. We have created some JUnit extension to easily write Selenium tests in Java.
19 -** Existing tests can be found in ~~trunks/xwiki-product-enterprise/distribution-test/selenium-tests/~~
19 +** Existing tests can be found in <tt>trunks/xwiki-product-enterprise/distribution-test/selenium-tests/</tt>
20 20  * We are using JUnit to perform functional tests for XMLRPC code. We have a JUnit extension framework for that too.
21 -** Existing tests can be found in ~~trunks/xwiki-product-enterprise/distribution-test/xmlrpc-tests/~~
21 +** Existing tests can be found in <tt>trunks/xwiki-product-enterprise/distribution-test/xmlrpc-tests/</tt>
22 22  * To run these tests on your local machine go to ~~trunks-devs/~~ and type ~~mvn install -Pxe,ci~~. This will build XWiki Enterprise and it's dependencies and run the tests on that (-Pci is needed since the tests are enabled by default only on the CI machine). Also check the [Building] page for more details.
23 -* If you only want to execute the tests on an already built XWiki Core, simply go in ~~trunks/xwiki-product-enterprise/distribution-test/~~ and type ~~mvn install~~
24 -* To run a specific test, pass the ~~pattern~~ property as in: ~~mvn install -Dpattern=DeletePageTest~~ (this will run the DeletePageTest - Note that you don't have to specify the extension)
25 -* To enable ~~debug output~~ from the selenium server start maven with the ~~-Ddebug=true~~ switch and then all messages from the selenium server are saved to: ~~distribution-test/selenium-tests/target/selenium/server.log~~
26 -* To debug a functional Selenium test in your favourite Java IDE go in ~~distribution-test/selenium-tests~~, edit the ~~pom.xml~~ to replace ~~&lt;background&gt;true&lt;/background&gt;~~ with ~~&lt;background&gt;false&lt;/background&gt;~~, run ~~mvn install~~, *start the xwiki version you wish to test*, go in your IDE, find the test you wish to run, put breakpoints and run it in debug mode. Not only will you get the Java debugging power but you can also see the browser in action, check the rendered page in the browser (using for Firebug example), etc.
23 +* If you only want to execute the tests on an already built XWiki Core, simply go in <tt>trunks/xwiki-product-enterprise/distribution-test/</tt> and type <tt>mvn install</tt>
24 +* To run a specific test, pass the <tt>pattern</tt> property as in: <tt>mvn install -Dpattern=DeletePageTest</tt> (this will run the <tt>DeletePageTest</tt> - Note that you don't have to specify the extension). In addition if you wish to execute only a specific method from a Test Case class, you can pass the <tt>patternMethod</tt> property as in: <tt>mvn install -Dpattern=DeletePageTest -DpatternMethod=testDeletePageCanDoRedirect</tt>.
25 +* To enable debug output from the selenium server start maven with the <tt>-Ddebug=true</tt> switch and then all messages from the selenium server are saved to: <tt>distribution-test/selenium-tests/target/selenium/server.log</tt>.
26 +* To debug a functional Selenium test in your favourite Java IDE go in <tt>distribution-test/selenium-tests</tt>, edit the <tt>pom.xml</tt> to replace <tt>&lt;background&gt;true&lt;/background&gt;</tt> with <tt>&lt;background&gt;false&lt;/background&gt;</tt>, run <tt>mvn install</tt>, *start the XWiki product version you wish to test*, go in your IDE, find the test you wish to run, put breakpoints and run it in debug mode. Not only will you get the Java debugging power but you can also see the browser in action, check the rendered page in the browser (using for Firebug example), etc.
27 27  
28 28  1.1 Performance Testing
29 29  

Get Connected