As you know, you can create a custom method in your AMImpl class and expose it in a client interfact so that you can use the method from your UI or any other client. You test your ADFbc using AM Tester and that is very easy and convenient tool. But how do you test your client methods? There is a new feature in 11g that supports testing your client methods also from your best friend - AM Tester.
Follow these steps to create and test a client method using AM Tester.
- Double click on AM to open in flag editor. Go to "Java" tab and click on "Edit" icon for "Java Class".
- Click on "Generate Application Module Class" and click ok. This creates Impl.java file
- Double click on the java file to open in source code editor. Add a method that you want to expose to the client.
- Double click on AM to open in flag editor. Go to "Java" tab and click on "Edit" icon for "Client Interface".
- Select the method from "Available" section and move it to "Selected" section and click ok. This creates AM Interface, Implementation and Client classes.
- Right click on the AM and select "Run". This will show up Business Component Browser.
- Right click on the AM and select "Show". This will show you tab to test your client methods.
- Select a method you want to test from the "Method" drop down if you have multiple methods.
- Specify parameter values for your method in "Property" and "Value" pair. Note that the property column maps to the parameter java type of your method. In this release, it does not show the name of parameter but in future releases it will. You need to enter parameter values in order they appear in your method signature.
- Click on execute button. Result will be "success" if there were no errors. If the method has any return value it is show in field "Return Value".
Comments
RSS feed for comments to this post