README revision ada1678a4262b208a7b87391f520a7767d25287c
43b4c41fbb07705c9df321221ab9cb9832460407Christian MaederAuthor: Kedar (km@dev.java.net)
c63ebf815c8a874525cf18670ad74847f7fc7b26Christian MaederAdded: 29 Aug 2008.
456238178f89e5a3de2988ee6c8af924297d52d9Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian MaederHere is a simple recipe to add a new asadmin command test to this test suite.
456238178f89e5a3de2988ee6c8af924297d52d9Christian MaederPlease let me know if you like it. Adding a new test should not take
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maedermore than 2 minutes, if you know what to test.
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder0- This suite is meant *exclusively* for asadmin tests. It uses TestNG.
43b4c41fbb07705c9df321221ab9cb9832460407Christian Maeder1- Extend BaseAsAdminTest which has got bunch of utility routines.
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder The design of this tests is done with this in mind. You have to
f4a2a20e49f41b2afa657e5e64d9e349c7faa091Christian Maeder extend BaseAsAdminTest. Don't reinvent the wheel.
f2f9df2e17e70674f0bf426ed1763c973ee4cde0Christian Maeder2- Start with *CAREFUL* copy + paste.
c9a7e6af169a2adfb92f42331cd578065ed83a2bChristian Maeder3- Look at any of the existing subclasses of BaseAsadminTest. Add
c9a7e6af169a2adfb92f42331cd578065ed83a2bChristian Maeder the command of your choice and annotate it with @Test.
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder Most of the time what you want is the "Manifest" object from an
e7757995211bd395dc79d26fe017d99375f7d2a6Christian Maeder asadmin command invocation. Utilities are provided for the same.
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder4- Add the command class in ../testng.xml.
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder5- That's it.
a1ed34933c266ce85066acb0d7b20c90cb8eb213Christian Maeder
c0c2380bced8159ff0297ece14eba948bd236471Christian MaederLimitations:
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich1- Does not use Maven. (That is not a real limitation :))
b1f59a4ea7c96f4c03a4d7cfcb9c5e66871cfbbbChristian Maeder Pom.xml is provided only for IDE. It's imperative that
ad270004874ce1d0697fb30d7309f180553bb315Christian Maeder you use IDE. Just point NetBeans to this pom.xml and your test development
4d56f2fa72e4aec20eb827c11ed49c8cbb7014bdChristian Maeder will be easier. Pom.xml is not used for building.
4cb215739e9ab13447fa21162482ebe485b47455Christian Maeder2- As of now, tests can't be run from this folder. You have to run them from
8ef75f1cc0437656bf622cec5ac9e8ea221da8f2Christian Maeder the parent folder (../)
404166b9366552e9ec5abb87a37c76ec8a815fb7Klaus Luettich3- Assumes a standard setup (default domain.xml etc.).
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder4- If the suite fails then you'll need to modify domain.xml by hand before
74eed04be26f549d2f7ca35c370e1c03879b28b1Christian Maeder re-running it.
d23b0cc79c0d204e6ec758dff8d0ba71c9f693f7Christian Maeder
3e8b136f23ed57d40ee617f49bcac37830b58cabChristian MaederNote:
ef9e8535c168d3f774d9e74368a2317a9eda5826Christian Maeder1- ../testng.xml
3e8b136f23ed57d40ee617f49bcac37830b58cabChristian Maeder <parameter name="admin.url" value="http://localhost:4848/__asadmin"/>
ef9e8535c168d3f774d9e74368a2317a9eda5826Christian Maeder <parameter name="admin.user" value="admin"/>
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder <parameter name="admin.password" value=""/>
e593b89bfd4952698dc37feced21cefe869d87a2Christian Maeder are the real parameters available to every test. You don't have to worry
63f0e65a37b95621334db9ee4ba0cd9d826f5c0fChristian Maeder about this.
5191fa24c532d1f67e7a642e9aece65efb8a0975Christian Maeder
7cc09dd93962a2155c34d209d1d4cd7d7b838264Christian MaederTBD:
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder1- Make the suite runnable with a domain that has password protection.
1aee4aaddde105264c1faf394d88e302c05094ffChristian Maeder