Creating Custom Tester Launch Page - adfemg/task-flow-tester GitHub Wiki

When testing task flows that use page fragments, these task flows run within the default ADF EMG task flow tester page. However, to successfully test your own task flows there might be situations where you need to create your own custom tester launch page. Typically, you will need such a page when your task flows rely on one or more of the following definitions to be present in the surrounding web page:

  • a JSF phase listener defined with the f:view tag
  • one or more Javascript libraries, typically defined within the metaContainer facet of the af:document tag
  • support for multi-part requests by setting the usesUpload property on the af:form tag to true.
  • global af:clientListener and/or af:serverListener tags, for example to implement keyboard function keys

Creating a custom tester launch page, is very easy because a task flow tester page template is provided that includes all the functionality you need to run the task flow tester. All you need to do is to launch the New JSF Page dialog in JDeveloper, and then base the page on the ADF EMG Task Flow Tester page template as shown below.

img-launcher/01-create-jsf-page.jpg

Now, you can add the definitions to your own tester page as you like. For example, you can add your own custom Javascript library as shown below.

img-launcher/02-edit-jsf-page.jpg

You can now directly run this page allowing you to test your task flows with your own tester launch page which includes all the required definitions. To make things even easier, you can change the Task Flow Tester run configuration that has been added to the project to point to your custom tester launch page. To do this go to Project properties > Run/Debug/Profile. Then select the Task Flow Tester run configuration and click the edit icon. Using the Browse button you can change the Default Run Target to use your custom tester launch page.

img-launcher/03-edit-run-config.jpg