Getting Started - adfemg/task-flow-tester GitHub Wiki

Installing the Task Flow Tester

The tester comes as a JDeveloper extension. You can install this extension by starting JDeveloper, then choose "Check for Updates..." from the Help menu. Make sure you check the checkbox for the "Open Source and Partners Extension" center. To quickly find the extension in the list, you can enter "tester" in the search box, as shown below (the extension version number will be different).

img-get-started/01-check-for-updates.jpg

After finishing the check for updates wizard you need to restart JDeveloper and you are ready to go!

If you need to install the extension when you are offline, you can also use the option to install from local file. You can download the correct install zip file from the download page.

img-get-started/02-install-zip.jpg

Running the Task Flow Tester

After you successfully installed the extension, you can start using the tester in your project. All you need to do is add the ADF EMG Task Flow Tester library to your project. Right-mouse-click on your project, choose Project Properties... then click Libraries and ClassPath and then click the Add Library... button. If the library does not show up in the list, the extension is not installed correctly, and you can try to reinstall it.

img-get-started/03-add-lib.jpg

After you clicked OK to add the library, and clicked OK to dismiss the project properties dialog, the following dialog appears, indicating a run configuration named Task Flow Tester has been added to your project, which is also set as default run configuration

img-get-started/04-run-config.jpg

You can now run the tester, by clicking on the run icon in the toolbar and choosing the Task Flow Tester run configuration. Likewise, you can run the tester in debug mode by clicking on the debug icon

img-get-started/05-run.jpg

If you get an authorization error your application is secured and you need to first grant the appropriate role to the the task flow tester resources. See section [Using the Tester in a Secured Application] for more info.

Using the Task Flow Tester

After you launched the tester using the "Task Flow Tester" run configuration, the following page should appear

img-get-started/06-home.jpg

As you can see there are no task flows shown yet. There are various ways to (pre-)load task flows into the tester, as is documented in more detail [here]. For now, we will use the easiest way when you are using the tester for the first time in your project, that is by clicking the iconic button to load available task flows.

img-get-started/07-load.jpg

If you followed the best practice to store task flows under (a sub-directory of) the /WEB-INF/ directory, you can leave the dialog values to their defaults. Otherwise, you need to change the value from Load From Directory. Now click OK to load the task flows in your project, the first task flow will be selected and your tester page will look something like the screen shot below.

img-get-started/08-taskflow-params.jpg

You can now select the task flow you want to test, enter task flow input parameter values, set run options as you like and run the test.

If you get an unexpected (Javascript) error when testing a task flow that uses page fragments, or the page "freezes" halfway after you clicked the Run button, then you might need to create a custom tester launch page because your task flow depends on certain definitions to be present in the surrounding web page. See section [Creating a Custom Tester Launch Page] for instructions to create such a page.

To re-test the same task flow, you first need to click the Reset button. If you want to save a combination of task flow input parameters and run options you can do so by clicking the Save As... button.

img-get-started/09-save.jpg

If you click OK, after entering a name for the testcase and optionally a description, the testcase will appear in the tree menu at the left. Clicking on a tescase in the tree menu will prepopulate the input parameters with the values as set when you saved the testcase.

img-get-started/10-saved.jpg

Note that you saved the testcases for the duration of the session. If you undeploy your application and run the tester again, the tree menu will be empty. Fortunately, you can export and import testcases and you can also start the tester with preloaded task flows and testcases. See section [Adding, Loading, Importing and Exporting Taskflows and Testcases].