You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@taverna.apache.org by st...@apache.org on 2015/02/23 11:18:58 UTC

[6/8] incubator-taverna-commandline git commit: Revert "temporarily empty repository"

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/java/uk/org/taverna/commandline/TavernaCommandLineTest.java
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/java/uk/org/taverna/commandline/TavernaCommandLineTest.java b/taverna-commandline-tests/src/test/java/uk/org/taverna/commandline/TavernaCommandLineTest.java
new file mode 100644
index 0000000..07df1c3
--- /dev/null
+++ b/taverna-commandline-tests/src/test/java/uk/org/taverna/commandline/TavernaCommandLineTest.java
@@ -0,0 +1,485 @@
+/*******************************************************************************
+ * Copyright (C) 2012 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package uk.org.taverna.commandline;
+
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assume.assumeTrue;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.net.URI;
+import java.net.URL;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.io.comparator.NameFileComparator;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import uk.org.taverna.commandline.WorkflowTestSuite.Workflows;
+import uk.org.taverna.scufl2.api.container.WorkflowBundle;
+import uk.org.taverna.scufl2.api.io.WorkflowBundleIO;
+import uk.org.taverna.scufl2.rdfxml.RDFXMLReader;
+
+/**
+ * Regression tests for Taverna Command Line Tool.
+ *
+ * @author David Withers
+ */
+@RunWith(WorkflowTestSuite.class)
+public class TavernaCommandLineTest {
+
+	private static String baseVersion = "2.4.0";
+	private static boolean baseVersionReleased = true;
+
+	private static String testVersion = "3.0.1-SNAPSHOT";
+	private static boolean testVersionReleased = false;
+	private static boolean testVersionSupportsScufl2 = true;
+
+	private static String script = "executeworkflow.sh";
+	private static String baseName = "taverna-commandline-" + baseVersion;
+	private static String testName = "taverna-command-line-" + testVersion;
+	private static String releasedLocation = "https://launchpad.net/taverna/t2/";
+	private static String unreleasedLocation = "http://build.mygrid.org.uk/ci/job/t3-taverna-commandline-product/lastSuccessfulBuild/net.sf.taverna.t2$taverna-commandline/artifact/net.sf.taverna.t2/taverna-commandline/";
+
+	private static String baseVersionLocation = (baseVersionReleased ? releasedLocation
+			: unreleasedLocation) + baseVersion + "/+download/" + baseName + ".zip";
+	private static String testVersionLocation = (testVersionReleased ? releasedLocation
+			: unreleasedLocation)
+			+ testVersion
+			+ "/"
+			+ testName
+			+ (testVersionReleased ? ".zip" : "-bin.zip");
+
+	private static String baseCommand;
+	private static String testCommand;
+
+	private static File buildDirectory;
+
+	private File workflowDirectory;
+	private File baseOutput;
+	private File testOutput;
+	private boolean secure;
+	private List<File> inputs;
+	private String ignorePort;
+	private String message;
+
+	public TavernaCommandLineTest(File workflowDirectory) throws Exception {
+		this.workflowDirectory = workflowDirectory;
+		if (buildDirectory == null) {
+			String buildDirectoryLocation = System.getProperty("buildDirectory");
+			if (buildDirectoryLocation == null) {
+				buildDirectoryLocation = System.getProperty("user.dir")
+						+ System.getProperty("file.separator") + "target";
+			}
+			buildDirectory = new File(buildDirectoryLocation);
+			buildDirectory.mkdirs();
+		}
+		if (baseCommand == null) {
+			File commandDirectory = new File(buildDirectory, baseName);
+			if (!commandDirectory.exists()) {
+				System.out.println("Fetching " + baseName);
+				fetchTaverna(baseVersionLocation, baseName);
+			}
+			baseCommand = new File(baseName, script).getPath();
+		}
+		if (testCommand == null) {
+			File commandDirectory = new File(buildDirectory, testName);
+			if (!commandDirectory.exists()) {
+				System.out.println("Fetching " + testName);
+				fetchTaverna(testVersionLocation, testName);
+			}
+			testCommand = new File(testName, script).getPath();
+		}
+		File outputsDirectory = new File(buildDirectory, "test-outputs");
+		baseOutput = new File(outputsDirectory, workflowDirectory.getName() + "-" + baseVersion);
+		testOutput = new File(outputsDirectory, workflowDirectory.getName() + "-" + testVersion);
+		secure = workflowDirectory.getName().startsWith("secure");
+		inputs = getInputs();
+		ignorePort = getIgnorePort();
+		message = "Running {0} with version {1}";
+	}
+
+	@Workflows
+	public static List<File> workflows() {
+		List<File> workflows = new ArrayList<File>();
+		for (File workflowDirectory : getResources("workflows")) {
+			workflows.add(workflowDirectory);
+		}
+		for (File workflowDirectory : getResources("myexperiment")) {
+			workflows.add(workflowDirectory);
+		}
+		return workflows;
+	}
+
+	@Before
+	public void setup() throws Exception {
+		if (!baseOutput.exists()) {
+			if (baseVersion.equals("2.3.0") && workflowDirectory.getName().equals("tool"))
+				return;// version 2.3.0 is missing tool plugin
+			String workflow = getWorkflow().toASCIIString();
+			System.out.println(MessageFormat.format(message, workflow, baseVersion)
+					+ (inputs.size() > 0 ? " using input values" : ""));
+			runWorkflow(baseCommand, workflow, baseOutput, true, secure, false);
+			assertTrue(String.format("No output produced for %s", workflowDirectory.getName()),
+					baseOutput.exists());
+		}
+	}
+
+	public boolean testExcluded() {
+		// version 3.0.0 is missing biomoby activity
+		if (testVersion.startsWith("3.") && workflowDirectory.getName().contains("biomoby"))
+			return true;
+		// version 3.0.0 is missing tool activity
+		if (testVersion.startsWith("3.")
+				&& workflowDirectory.getName().equals("unix_external_tools_with_zip_and_unzip"))
+			return true;
+		if (testVersion.startsWith("3.")
+				&& workflowDirectory.getName().equals("unix_numerically_adding_two_values"))
+			return true;
+		if (testVersion.startsWith("3.")
+				&& workflowDirectory.getName().equals("unix_tool_service_using_string_replacement"))
+			return true;
+		// version 3.0.0 is missing looping configuration
+		if (testVersion.startsWith("3.")
+				&& workflowDirectory.getName().equals("ebi_interproscan_newservices"))
+			return true;
+		if (testVersion.startsWith("3.")
+				&& workflowDirectory.getName().equals("biomartandembossanalysis"))
+			return true;
+		return false;
+	}
+
+	@Test
+	public void testWorkflowWithoutInputs() throws Exception {
+		assumeTrue(!testExcluded());
+		assumeTrue(baseOutput.exists());
+		assumeTrue(inputs.isEmpty());
+		FileUtils.deleteDirectory(testOutput);
+		String workflow = getWorkflow().toASCIIString();
+		System.out.println(MessageFormat.format(message, workflow, testVersion));
+		runWorkflow(testCommand, workflow, testOutput, true, secure, false);
+		assertTrue(String.format("No output produced for %s", workflowDirectory.getName()),
+				testOutput.exists());
+		assertOutputsEquals(baseOutput, testOutput);
+	}
+
+	@Test
+	public void testWorkflowWithInputValues() throws Exception {
+		assumeTrue(!testExcluded());
+		assumeTrue(baseOutput.exists());
+		assumeTrue(inputs.size() > 0);
+		FileUtils.deleteDirectory(testOutput);
+		String workflow = getWorkflow().toASCIIString();
+		System.out.println(MessageFormat.format(message, workflow, testVersion)
+				+ " using input values");
+		runWorkflow(testCommand, workflow, testOutput, true, secure, false);
+		assertTrue(String.format("No output produced for %s", workflowDirectory.getName()),
+				testOutput.exists());
+		assertOutputsEquals(baseOutput, testOutput);
+	}
+
+	@Test
+	public void testWorkflowWithInputFiles() throws Exception {
+		assumeTrue(!testExcluded());
+		assumeTrue(baseOutput.exists());
+		assumeTrue(inputs.size() > 0);
+		FileUtils.deleteDirectory(testOutput);
+		String workflow = getWorkflow().toASCIIString();
+		System.out.println(MessageFormat.format(message, workflow, testVersion)
+				+ " using input files");
+		runWorkflow(testCommand, workflow, testOutput, false, secure, false);
+		assertTrue(String.format("No output produced for %s", workflowDirectory.getName()),
+				testOutput.exists());
+		assertOutputsEquals(baseOutput, testOutput);
+	}
+
+	@Test
+	@Ignore
+	public void testWorkflowWithDatabase() throws Exception {
+		assumeTrue(!testExcluded());
+		assumeTrue(baseOutput.exists());
+		assumeTrue(inputs.size() > 0);
+		FileUtils.deleteDirectory(testOutput);
+		String workflow = getWorkflow().toASCIIString();
+		System.out
+				.println(MessageFormat.format(message, workflow, testVersion) + " using database");
+		runWorkflow(testCommand, workflow, testOutput, true, secure, true);
+		assertTrue(String.format("No output produced for %s", workflowDirectory.getName()),
+				testOutput.exists());
+		assertOutputsEquals(baseOutput, testOutput);
+	}
+
+	@Test
+	public void testScufl2Workflow() throws Exception {
+		assumeTrue(!testExcluded());
+		assumeTrue(baseOutput.exists());
+		assumeTrue(testVersionSupportsScufl2);
+
+		FileUtils.deleteDirectory(testOutput);
+		String workflow = getScufl2Workflow().toASCIIString();
+		System.out.println(MessageFormat.format(message, workflow, testVersion)
+				+ (inputs.size() > 0 ? " using input values" : ""));
+		runWorkflow(testCommand, workflow, testOutput, true, secure, true);
+		assertTrue(String.format("No output produced for %s", workflowDirectory.getName()),
+				testOutput.exists());
+		assertOutputsEquals(baseOutput, testOutput);
+	}
+
+	private synchronized void runWorkflow(String command, String workflow, File outputsDirectory,
+			boolean inputValues, boolean secure, boolean database) throws Exception {
+		ProcessBuilder processBuilder = new ProcessBuilder("sh", command);
+		processBuilder.redirectErrorStream(true);
+		processBuilder.directory(buildDirectory);
+		List<String> args = processBuilder.command();
+		for (File input : inputs) {
+			if (inputValues) {
+				args.add("-inputvalue");
+				args.add(input.getName());
+				args.add(IOUtils.toString(new FileReader(input)));
+			} else {
+				args.add("-inputfile");
+				args.add(input.getName());
+				args.add(input.getAbsolutePath());
+			}
+		}
+		args.add("-outputdir");
+		args.add(outputsDirectory.getPath());
+		if (secure) {
+			args.add("-cmdir");
+			args.add(getClass().getResource("/security").getFile());
+			args.add("-cmpassword");
+		}
+		if (database) {
+			args.add("-embedded");
+		}
+		args.add(workflow);
+		Process process = processBuilder.start();
+		if (secure) {
+			PrintStream outputStream = new PrintStream(process.getOutputStream());
+			outputStream.println("test");
+			outputStream.flush();
+		}
+		waitFor(process);
+	}
+
+	private URI getWorkflow() throws Exception {
+		File workflow = new File(workflowDirectory, workflowDirectory.getName() + ".t2flow");
+		if (!workflow.exists()) {
+			workflow = new File(workflowDirectory, workflowDirectory.getName() + ".url");
+			return new URI(IOUtils.toString(new FileReader(workflow)));
+		}
+		return workflow.toURI();
+	}
+
+	private URI getScufl2Workflow() throws Exception {
+		File workflow = new File(buildDirectory, workflowDirectory.getName() + ".wfbundle");
+		// if (!workflow.exists()) {
+		WorkflowBundleIO workflowBundleIO = new WorkflowBundleIO();
+		WorkflowBundle bundle = workflowBundleIO.readBundle(getWorkflow().toURL(), null);
+		workflowBundleIO.writeBundle(bundle, workflow,
+				RDFXMLReader.APPLICATION_VND_TAVERNA_SCUFL2_WORKFLOW_BUNDLE);
+		// }
+		return workflow.toURI();
+	}
+
+	private synchronized int waitFor(Process process) throws IOException {
+		while (true) {
+			try {
+				wait(500);
+			} catch (InterruptedException e) {
+			}
+			IOUtils.copy(process.getInputStream(), System.out);
+			try {
+				return process.exitValue();
+			} catch (IllegalThreadStateException e) {
+			}
+		}
+	}
+
+	private void assertOutputsEquals(File directory1, File directory2) {
+		File[] directory1Files = directory1.listFiles();
+		File[] directory2Files = directory2.listFiles();
+		// assert directories contain same number of files
+		assertEquals(String.format("%s has %s files but %s has %s files", directory1.getName(),
+				directory1Files.length, directory2.getName(), directory2Files.length),
+				directory1Files.length, directory2Files.length);
+		// sort files in directory
+		Arrays.sort(directory1Files, NameFileComparator.NAME_SYSTEM_COMPARATOR);
+		Arrays.sort(directory2Files, NameFileComparator.NAME_SYSTEM_COMPARATOR);
+		for (int i = 0; i < directory1Files.length; i++) {
+			assertFilesEqual(directory1Files[i], directory2Files[i], !directory1Files[i].getName()
+					.equals(ignorePort));
+		}
+	}
+
+	private void assertDirectoriesEquals(File directory1, File directory2, boolean checkFileContents) {
+		if (directory1.exists()) {
+			assertTrue(String.format("%s exists but %s does not", directory1, directory2),
+					directory2.exists());
+		} else {
+			assertFalse(String.format("%s does not exists but %s does", directory1, directory2),
+					directory2.exists());
+		}
+		File[] directory1Files = directory1.listFiles();
+		File[] directory2Files = directory2.listFiles();
+		// assert directories contain same number of files
+		assertEquals(String.format("%s has %s files but %s has %s files", directory1.getName(),
+				directory1Files.length, directory2.getName(), directory2Files.length),
+				directory1Files.length, directory2Files.length);
+		// sort files in directory
+		Arrays.sort(directory1Files, NameFileComparator.NAME_SYSTEM_COMPARATOR);
+		Arrays.sort(directory2Files, NameFileComparator.NAME_SYSTEM_COMPARATOR);
+		for (int i = 0; i < directory1Files.length; i++) {
+			assertFilesEqual(directory1Files[i], directory2Files[i], checkFileContents);
+		}
+	}
+
+	private void assertFilesEqual(File file1, File file2, boolean checkFileContents) {
+		if (file1.isHidden()) {
+			assertTrue(String.format("%s is hidden but %s is not", file1, file2), file2.isHidden());
+		} else {
+			assertFalse(String.format("%s is not hidden but %s is", file1, file2), file2.isHidden());
+			assertEquals(file1.getName(), file2.getName());
+			if (file1.isDirectory()) {
+				assertTrue(String.format("%s is a directory but %s is not", file1, file2),
+						file2.isDirectory());
+				assertDirectoriesEquals(file1, file2, checkFileContents);
+			} else {
+				assertFalse(String.format("%s is not a directory but %s is", file1, file2),
+						file2.isDirectory());
+				if (isZipFile(file1)) {
+					assertZipFilesEqual(file1, file2);
+				} else if (checkFileContents) {
+					assertEquals(String.format("%s is a different length to %s", file1, file2),
+							file1.length(), file2.length());
+					try {
+						byte[] byteArray1 = IOUtils.toByteArray(new FileReader(file1));
+						byte[] byteArray2 = IOUtils.toByteArray(new FileReader(file2));
+						assertArrayEquals(String.format("%s != %s", file1, file2), byteArray1,
+								byteArray2);
+					} catch (FileNotFoundException e) {
+						fail(e.getMessage());
+					} catch (IOException e) {
+						fail(e.getMessage());
+					}
+				}
+			}
+		}
+	}
+
+	private void assertZipFilesEqual(File file1, File file2) {
+		ZipFile zipFile1 = null;
+		ZipFile zipFile2 = null;
+		try {
+			zipFile1 = new ZipFile(file1);
+			zipFile2 = new ZipFile(file2);
+		} catch (Exception e) {
+			assertTrue(String.format("%s and %s are not both zip files"), zipFile1 == null);
+		}
+		if (zipFile1 != null && zipFile2 != null) {
+			Enumeration<? extends ZipEntry> entries1 = zipFile1.entries();
+			Enumeration<? extends ZipEntry> entries2 = zipFile2.entries();
+			while (entries1.hasMoreElements()) {
+				assertTrue(entries2.hasMoreElements());
+				ZipEntry zipEntry1 = entries1.nextElement();
+				ZipEntry zipEntry2 = entries2.nextElement();
+				assertEquals(
+						String.format("%s and %s are not both directories", zipEntry1, zipEntry2),
+						zipEntry1.isDirectory(), zipEntry2.isDirectory());
+				assertEquals(String.format("%s and %s have different names", zipEntry1, zipEntry2),
+						zipEntry1.getName(), zipEntry2.getName());
+				assertEquals(String.format("%s and %s have different sizes", zipEntry1, zipEntry2),
+						zipEntry1.getSize(), zipEntry2.getSize());
+				try {
+					byte[] byteArray1 = IOUtils.toByteArray(zipFile1.getInputStream(zipEntry1));
+					byte[] byteArray2 = IOUtils.toByteArray(zipFile2.getInputStream(zipEntry2));
+					assertArrayEquals(String.format("%s != %s", zipEntry1, zipEntry2), byteArray1,
+							byteArray2);
+				} catch (IOException e) {
+					// TODO Auto-generated catch block
+					e.printStackTrace();
+				}
+			}
+			assertFalse(entries2.hasMoreElements());
+		}
+	}
+
+	private boolean isZipFile(File file) {
+		try {
+			new ZipFile(file);
+			return true;
+		} catch (Exception e) {
+			return false;
+		}
+	}
+
+	private static File[] getResources(String directory) {
+		return new File(TavernaCommandLineTest.class.getResource("/" + directory).getFile())
+				.listFiles();
+	}
+
+	private List<File> getInputs() {
+		File inputsDirectory = new File(workflowDirectory, "inputs");
+		if (inputsDirectory.exists() && inputsDirectory.isDirectory()) {
+			return Arrays.asList(inputsDirectory.listFiles());
+		}
+		return Collections.emptyList();
+	}
+
+	private String getIgnorePort() throws Exception {
+		File ignorePort = new File(workflowDirectory, "ignorePort");
+		if (ignorePort.exists()) {
+			return IOUtils.toString(new FileReader(ignorePort));
+		}
+		return "";
+	}
+
+	private void fetchTaverna(String location, String name) throws Exception {
+		File zipFile = new File(buildDirectory, name + ".zip");
+		IOUtils.copy(new URL(location).openStream(), new FileOutputStream(zipFile));
+		ProcessBuilder processBuilder = new ProcessBuilder("unzip", "-q", name);
+		processBuilder.redirectErrorStream(true);
+		processBuilder.directory(buildDirectory);
+		System.out.println(processBuilder.command());
+		Process process = processBuilder.start();
+		waitFor(process);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/java/uk/org/taverna/commandline/WorkflowTestRunner.java
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/java/uk/org/taverna/commandline/WorkflowTestRunner.java b/taverna-commandline-tests/src/test/java/uk/org/taverna/commandline/WorkflowTestRunner.java
new file mode 100644
index 0000000..56ed82d
--- /dev/null
+++ b/taverna-commandline-tests/src/test/java/uk/org/taverna/commandline/WorkflowTestRunner.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (C) 2012 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package uk.org.taverna.commandline;
+
+import java.io.File;
+import java.util.List;
+
+import org.junit.runner.notification.RunNotifier;
+import org.junit.runners.BlockJUnit4ClassRunner;
+import org.junit.runners.model.FrameworkMethod;
+import org.junit.runners.model.InitializationError;
+import org.junit.runners.model.Statement;
+
+/**
+ * Test runner for running workflows.
+ *
+ * @author David Withers
+ */
+public class WorkflowTestRunner extends BlockJUnit4ClassRunner {
+	private File workflow;
+
+	public WorkflowTestRunner(Class<?> type, File workflow) throws InitializationError {
+		super(type);
+		this.workflow = workflow;
+	}
+
+	@Override
+	public Object createTest() throws Exception {
+		return getTestClass().getOnlyConstructor().newInstance(workflow);
+	}
+
+	@Override
+	protected String getName() {
+		return String.format("[%s]", workflow.getName());
+	}
+
+	@Override
+	protected String testName(final FrameworkMethod method) {
+		return String.format("%s[%s]", method.getName(), workflow.getName());
+	}
+
+	@Override
+	protected void validateConstructor(List<Throwable> errors) {
+		validateOnlyOneConstructor(errors);
+	}
+
+	@Override
+	protected Statement classBlock(RunNotifier notifier) {
+		return childrenInvoker(notifier);
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/java/uk/org/taverna/commandline/WorkflowTestSuite.java
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/java/uk/org/taverna/commandline/WorkflowTestSuite.java b/taverna-commandline-tests/src/test/java/uk/org/taverna/commandline/WorkflowTestSuite.java
new file mode 100644
index 0000000..140dec6
--- /dev/null
+++ b/taverna-commandline-tests/src/test/java/uk/org/taverna/commandline/WorkflowTestSuite.java
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * Copyright (C) 2012 The University of Manchester
+ *
+ *  Modifications to the initial code base are copyright of their
+ *  respective authors, or their employers as appropriate.
+ *
+ *  This program is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1 of
+ *  the License, or (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful, but
+ *  WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ ******************************************************************************/
+package uk.org.taverna.commandline;
+
+import java.io.File;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.reflect.Modifier;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.junit.runner.Runner;
+import org.junit.runners.Suite;
+import org.junit.runners.model.FrameworkMethod;
+import org.junit.runners.model.TestClass;
+
+/**
+ * Test suite for running workflows specified by a method annotated by &#064;Workflows.
+ *
+ * @author David Withers
+ */
+public class WorkflowTestSuite extends Suite {
+
+	@Retention(RetentionPolicy.RUNTIME)
+	@Target(ElementType.METHOD)
+	public static @interface Workflows {}
+
+	private ArrayList<Runner> runners = new ArrayList<Runner>();
+
+	public WorkflowTestSuite(Class<?> klass) throws Throwable {
+		super(klass, Collections.<Runner>emptyList());
+		for (File workflow : getWorkflows(getTestClass())) {
+			runners.add(new WorkflowTestRunner(getTestClass().getJavaClass(), workflow));
+		}
+	}
+
+	@Override
+	protected List<Runner> getChildren() {
+		return runners;
+	}
+
+	@SuppressWarnings("unchecked")
+	private List<File> getWorkflows(TestClass klass) throws Throwable {
+		return (List<File>) getWorkflowsMethod(klass).invokeExplosively(null);
+	}
+
+	public FrameworkMethod getWorkflowsMethod(TestClass testClass) throws Exception {
+		List<FrameworkMethod> methods = testClass.getAnnotatedMethods(Workflows.class);
+		for (FrameworkMethod method : methods) {
+			int modifiers = method.getMethod().getModifiers();
+			if (Modifier.isStatic(modifiers) && Modifier.isPublic(modifiers)) {
+				return method;
+			}
+		}
+		throw new Exception("No public static Workflows annotated method on class " + testClass.getName());
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/biomartandembossanalysis/biomartandembossanalysis.url
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/biomartandembossanalysis/biomartandembossanalysis.url b/taverna-commandline-tests/src/test/resources/myexperiment/biomartandembossanalysis/biomartandembossanalysis.url
new file mode 100644
index 0000000..5846961
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/biomartandembossanalysis/biomartandembossanalysis.url
@@ -0,0 +1 @@
+http://www.myexperiment.org/workflows/1794/download/biomartandembossanalysis_457009.t2flow?version=4
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/biomartandembossanalysis/ignorePort
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/biomartandembossanalysis/ignorePort b/taverna-commandline-tests/src/test/resources/myexperiment/biomartandembossanalysis/ignorePort
new file mode 100644
index 0000000..e0cb526
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/biomartandembossanalysis/ignorePort
@@ -0,0 +1 @@
+outputPlot
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/biomoby_tutorial_workflow/biomoby_tutorial_workflow.url
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/biomoby_tutorial_workflow/biomoby_tutorial_workflow.url b/taverna-commandline-tests/src/test/resources/myexperiment/biomoby_tutorial_workflow/biomoby_tutorial_workflow.url
new file mode 100644
index 0000000..a73b8c4
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/biomoby_tutorial_workflow/biomoby_tutorial_workflow.url
@@ -0,0 +1 @@
+http://www.myexperiment.org/workflows/1366/download/biomoby_tutorial_workflow_877727.t2flow?version=1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/biomoby_tutorial_workflow/ignorePort
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/biomoby_tutorial_workflow/ignorePort b/taverna-commandline-tests/src/test/resources/myexperiment/biomoby_tutorial_workflow/ignorePort
new file mode 100644
index 0000000..f8e22dd
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/biomoby_tutorial_workflow/ignorePort
@@ -0,0 +1 @@
+restrict_out
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/biomoby_tutorial_workflow/inputs/id
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/biomoby_tutorial_workflow/inputs/id b/taverna-commandline-tests/src/test/resources/myexperiment/biomoby_tutorial_workflow/inputs/id
new file mode 100644
index 0000000..1dfd176
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/biomoby_tutorial_workflow/inputs/id
@@ -0,0 +1 @@
+656461
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/biomoby_tutorial_workflow/inputs/namespace
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/biomoby_tutorial_workflow/inputs/namespace b/taverna-commandline-tests/src/test/resources/myexperiment/biomoby_tutorial_workflow/inputs/namespace
new file mode 100644
index 0000000..c188363
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/biomoby_tutorial_workflow/inputs/namespace
@@ -0,0 +1 @@
+NCBI_gi
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/demonstration_of_configurable_iteration/demonstration_of_configurable_iteration.url
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/demonstration_of_configurable_iteration/demonstration_of_configurable_iteration.url b/taverna-commandline-tests/src/test/resources/myexperiment/demonstration_of_configurable_iteration/demonstration_of_configurable_iteration.url
new file mode 100644
index 0000000..38abe3a
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/demonstration_of_configurable_iteration/demonstration_of_configurable_iteration.url
@@ -0,0 +1 @@
+http://www.myexperiment.org/workflows/1367/download/demonstration_of_configurable_iteration_114130.t2flow?version=1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/ebi_interproscan_newservices/ebi_interproscan_newservices.url
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/ebi_interproscan_newservices/ebi_interproscan_newservices.url b/taverna-commandline-tests/src/test/resources/myexperiment/ebi_interproscan_newservices/ebi_interproscan_newservices.url
new file mode 100644
index 0000000..a329afc
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/ebi_interproscan_newservices/ebi_interproscan_newservices.url
@@ -0,0 +1 @@
+http://www.myexperiment.org/workflows/1767/download/ebi_interproscan_newservices_421482.t2flow?version=2
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/ebi_interproscan_newservices/ignorePort
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/ebi_interproscan_newservices/ignorePort b/taverna-commandline-tests/src/test/resources/myexperiment/ebi_interproscan_newservices/ignorePort
new file mode 100644
index 0000000..1ec3d86
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/ebi_interproscan_newservices/ignorePort
@@ -0,0 +1 @@
+Graphical_output
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/ebi_interproscan_newservices/inputs/email
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/ebi_interproscan_newservices/inputs/email b/taverna-commandline-tests/src/test/resources/myexperiment/ebi_interproscan_newservices/inputs/email
new file mode 100644
index 0000000..38133d0
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/ebi_interproscan_newservices/inputs/email
@@ -0,0 +1 @@
+test@mygrid.org.uk
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/ebi_interproscan_newservices/inputs/sequence
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/ebi_interproscan_newservices/inputs/sequence b/taverna-commandline-tests/src/test/resources/myexperiment/ebi_interproscan_newservices/inputs/sequence
new file mode 100644
index 0000000..19a43dd
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/ebi_interproscan_newservices/inputs/sequence
@@ -0,0 +1,8 @@
+>sp|Q9BTV4|TMM43_HUMAN Transmembrane protein 43 OS=Homo sapiens GN=TMEM43 PE=1 SV=1
+MAANYSSTSTRREHVKVKTSSQPGFLERLSETSGGMFVGLMAFLLSFYLIFTNEGRALKT
+ATSLAEGLSLVVSPDSIHSVAPENEGRLVHIIGALRTSKLLSDPNYGVHLPAVKLRRHVE
+MYQWVETEESREYTEDGQVKKETRYSYNTEWRSEIINSKNFDREIGHKNPSAMAVESFMA
+TAPFVQIGRFFLSSGLIDKVDNFKSLSLSKLEDPHVDIIRRGDFFYHSENPKYPEVGDLR
+VSFSYAGLSGDDPDLGPAHVVTVIARQRGDQLVPFSTKSGDTLLLLHHGDFSAEEVFHRE
+LRSNSMKTWGLRAAGWMAMFMGLNLMTRILYTLVDWFPVFRDLVNIGLKAFAFCVATSLT
+LLTVAAGWLFYRPLWALLIAGLALVPILVARTRVPAKKLE
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/example_of_conditional_invocation/example_of_conditional_invocation.url
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/example_of_conditional_invocation/example_of_conditional_invocation.url b/taverna-commandline-tests/src/test/resources/myexperiment/example_of_conditional_invocation/example_of_conditional_invocation.url
new file mode 100644
index 0000000..350a27f
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/example_of_conditional_invocation/example_of_conditional_invocation.url
@@ -0,0 +1 @@
+http://www.myexperiment.org/workflows/2561/download/example_of_conditional_invocation_369634.t2flow?version=1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/example_of_conditional_invocation/inputs/condition
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/example_of_conditional_invocation/inputs/condition b/taverna-commandline-tests/src/test/resources/myexperiment/example_of_conditional_invocation/inputs/condition
new file mode 100644
index 0000000..f32a580
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/example_of_conditional_invocation/inputs/condition
@@ -0,0 +1 @@
+true
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/example_of_explicit_looping/example_of_explicit_looping.url
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/example_of_explicit_looping/example_of_explicit_looping.url b/taverna-commandline-tests/src/test/resources/myexperiment/example_of_explicit_looping/example_of_explicit_looping.url
new file mode 100644
index 0000000..a8773c4
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/example_of_explicit_looping/example_of_explicit_looping.url
@@ -0,0 +1 @@
+http://www.myexperiment.org/workflows/2562/download/example_of_explicit_looping_785852.t2flow?version=1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/example_of_explicit_looping/inputs/end
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/example_of_explicit_looping/inputs/end b/taverna-commandline-tests/src/test/resources/myexperiment/example_of_explicit_looping/inputs/end
new file mode 100644
index 0000000..da2d398
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/example_of_explicit_looping/inputs/end
@@ -0,0 +1 @@
+14
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/example_of_explicit_looping/inputs/start
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/example_of_explicit_looping/inputs/start b/taverna-commandline-tests/src/test/resources/myexperiment/example_of_explicit_looping/inputs/start
new file mode 100644
index 0000000..7d105a7
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/example_of_explicit_looping/inputs/start
@@ -0,0 +1 @@
+-3
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/example_of_explicit_looping/inputs/step
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/example_of_explicit_looping/inputs/step b/taverna-commandline-tests/src/test/resources/myexperiment/example_of_explicit_looping/inputs/step
new file mode 100644
index 0000000..e440e5c
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/example_of_explicit_looping/inputs/step
@@ -0,0 +1 @@
+3
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/example_workflow_for_rest_and_xpath_activities/example_workflow_for_rest_and_xpath_activities.url
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/example_workflow_for_rest_and_xpath_activities/example_workflow_for_rest_and_xpath_activities.url b/taverna-commandline-tests/src/test/resources/myexperiment/example_workflow_for_rest_and_xpath_activities/example_workflow_for_rest_and_xpath_activities.url
new file mode 100644
index 0000000..bd3ff3d
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/example_workflow_for_rest_and_xpath_activities/example_workflow_for_rest_and_xpath_activities.url
@@ -0,0 +1 @@
+http://www.myexperiment.org/workflows/1510/download/example_workflow_for_rest_and_xpath_activities_650957.t2flow?version=1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/example_workflow_for_rest_and_xpath_activities/inputs/Name_Of_Location_for_Weather_Forecast
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/example_workflow_for_rest_and_xpath_activities/inputs/Name_Of_Location_for_Weather_Forecast b/taverna-commandline-tests/src/test/resources/myexperiment/example_workflow_for_rest_and_xpath_activities/inputs/Name_Of_Location_for_Weather_Forecast
new file mode 100644
index 0000000..bbab6f1
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/example_workflow_for_rest_and_xpath_activities/inputs/Name_Of_Location_for_Weather_Forecast
@@ -0,0 +1 @@
+London
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/fetch_dragon_images_from_biomoby/fetch_dragon_images_from_biomoby.url
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/fetch_dragon_images_from_biomoby/fetch_dragon_images_from_biomoby.url b/taverna-commandline-tests/src/test/resources/myexperiment/fetch_dragon_images_from_biomoby/fetch_dragon_images_from_biomoby.url
new file mode 100644
index 0000000..1aeab4b
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/fetch_dragon_images_from_biomoby/fetch_dragon_images_from_biomoby.url
@@ -0,0 +1 @@
+http://www.myexperiment.org/workflows/1005/download/fetch_dragon_images_from_biomoby_830269.t2flow?version=2
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/fetch_pdb_flatfile_from_rcsb_server/fetch_pdb_flatfile_from_rcsb_server.url
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/fetch_pdb_flatfile_from_rcsb_server/fetch_pdb_flatfile_from_rcsb_server.url b/taverna-commandline-tests/src/test/resources/myexperiment/fetch_pdb_flatfile_from_rcsb_server/fetch_pdb_flatfile_from_rcsb_server.url
new file mode 100644
index 0000000..5d10074
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/fetch_pdb_flatfile_from_rcsb_server/fetch_pdb_flatfile_from_rcsb_server.url
@@ -0,0 +1 @@
+http://www.myexperiment.org/workflows/1369/download/fetch_pdb_flatfile_from_rcsb_server_969361.t2flow?version=1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/fetch_pdb_flatfile_from_rcsb_server/inputs/pdbID
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/fetch_pdb_flatfile_from_rcsb_server/inputs/pdbID b/taverna-commandline-tests/src/test/resources/myexperiment/fetch_pdb_flatfile_from_rcsb_server/inputs/pdbID
new file mode 100644
index 0000000..7f3db81
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/fetch_pdb_flatfile_from_rcsb_server/inputs/pdbID
@@ -0,0 +1 @@
+1crn
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/fetch_today_s_xkcd_comic/fetch_today_s_xkcd_comic.url
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/fetch_today_s_xkcd_comic/fetch_today_s_xkcd_comic.url b/taverna-commandline-tests/src/test/resources/myexperiment/fetch_today_s_xkcd_comic/fetch_today_s_xkcd_comic.url
new file mode 100644
index 0000000..48f849f
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/fetch_today_s_xkcd_comic/fetch_today_s_xkcd_comic.url
@@ -0,0 +1 @@
+http://www.myexperiment.org/workflows/1370/download/fetch_today_s_xkcd_comic_568671.t2flow?version=1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/gbseq_test/gbseq_test.url
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/gbseq_test/gbseq_test.url b/taverna-commandline-tests/src/test/resources/myexperiment/gbseq_test/gbseq_test.url
new file mode 100644
index 0000000..c0f40c5
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/gbseq_test/gbseq_test.url
@@ -0,0 +1 @@
+http://www.myexperiment.org/workflows/1371/download/gbseq_test_457824.t2flow?version=1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/hello_anyone/hello_anyone.url
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/hello_anyone/hello_anyone.url b/taverna-commandline-tests/src/test/resources/myexperiment/hello_anyone/hello_anyone.url
new file mode 100644
index 0000000..f4181b8
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/hello_anyone/hello_anyone.url
@@ -0,0 +1 @@
+http://www.myexperiment.org/workflows/2649/download/hello_anyone_895936.t2flow?version=1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/hello_anyone/inputs/name
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/hello_anyone/inputs/name b/taverna-commandline-tests/src/test/resources/myexperiment/hello_anyone/inputs/name
new file mode 100644
index 0000000..d565a0b
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/hello_anyone/inputs/name
@@ -0,0 +1 @@
+Fred
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/hello_world/hello_world.url
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/hello_world/hello_world.url b/taverna-commandline-tests/src/test/resources/myexperiment/hello_world/hello_world.url
new file mode 100644
index 0000000..c596de4
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/hello_world/hello_world.url
@@ -0,0 +1 @@
+http://www.myexperiment.org/workflows/2648/download/hello_world_190236.t2flow?version=1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/pipelined_list_iteration/inputs/input
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/pipelined_list_iteration/inputs/input b/taverna-commandline-tests/src/test/resources/myexperiment/pipelined_list_iteration/inputs/input
new file mode 100644
index 0000000..4701cc7
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/pipelined_list_iteration/inputs/input
@@ -0,0 +1 @@
+150
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/pipelined_list_iteration/pipelined_list_iteration.url
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/pipelined_list_iteration/pipelined_list_iteration.url b/taverna-commandline-tests/src/test/resources/myexperiment/pipelined_list_iteration/pipelined_list_iteration.url
new file mode 100644
index 0000000..dd3c98c
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/pipelined_list_iteration/pipelined_list_iteration.url
@@ -0,0 +1 @@
+http://www.myexperiment.org/workflows/1372/download/pipelined_list_iteration_902021.t2flow?version=1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/retrieve_sequence_in_embl_format/retrieve_sequence_in_embl_format.url
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/retrieve_sequence_in_embl_format/retrieve_sequence_in_embl_format.url b/taverna-commandline-tests/src/test/resources/myexperiment/retrieve_sequence_in_embl_format/retrieve_sequence_in_embl_format.url
new file mode 100644
index 0000000..2b4ab46
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/retrieve_sequence_in_embl_format/retrieve_sequence_in_embl_format.url
@@ -0,0 +1 @@
+http://www.myexperiment.org/workflows/1373/download/retrieve_sequence_in_embl_format_32794.t2flow?version=1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/secure_rest_service_call_example/secure_rest_service_call_example.url
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/secure_rest_service_call_example/secure_rest_service_call_example.url b/taverna-commandline-tests/src/test/resources/myexperiment/secure_rest_service_call_example/secure_rest_service_call_example.url
new file mode 100644
index 0000000..03cf409
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/secure_rest_service_call_example/secure_rest_service_call_example.url
@@ -0,0 +1 @@
+http://www.myexperiment.org/workflows/2253/download/secure_rest_service_call_example_19600.t2flow?version=1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/secure_web_service_call_example/secure_web_service_call_example.url
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/secure_web_service_call_example/secure_web_service_call_example.url b/taverna-commandline-tests/src/test/resources/myexperiment/secure_web_service_call_example/secure_web_service_call_example.url
new file mode 100644
index 0000000..c2a4ad4
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/secure_web_service_call_example/secure_web_service_call_example.url
@@ -0,0 +1 @@
+http://www.myexperiment.org/workflows/2254/download/secure_web_service_call_example_565494.t2flow?version=1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/spreadsheed_data_import_example/spreadsheed_data_import_example.url
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/spreadsheed_data_import_example/spreadsheed_data_import_example.url b/taverna-commandline-tests/src/test/resources/myexperiment/spreadsheed_data_import_example/spreadsheed_data_import_example.url
new file mode 100644
index 0000000..98d8ed4
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/spreadsheed_data_import_example/spreadsheed_data_import_example.url
@@ -0,0 +1 @@
+http://www.myexperiment.org/workflows/1417/download/spreadsheed_data_import_example_492836.t2flow?version=1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/unix_external_tools_with_zip_and_unzip/unix_external_tools_with_zip_and_unzip.url
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/unix_external_tools_with_zip_and_unzip/unix_external_tools_with_zip_and_unzip.url b/taverna-commandline-tests/src/test/resources/myexperiment/unix_external_tools_with_zip_and_unzip/unix_external_tools_with_zip_and_unzip.url
new file mode 100644
index 0000000..958de61
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/unix_external_tools_with_zip_and_unzip/unix_external_tools_with_zip_and_unzip.url
@@ -0,0 +1 @@
+http://www.myexperiment.org/workflows/2230/download/example_for_external_tools_with_zip_and_unzip_57117.t2flow?version=1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/unix_numerically_adding_two_values/inputs/a
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/unix_numerically_adding_two_values/inputs/a b/taverna-commandline-tests/src/test/resources/myexperiment/unix_numerically_adding_two_values/inputs/a
new file mode 100644
index 0000000..56a6051
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/unix_numerically_adding_two_values/inputs/a
@@ -0,0 +1 @@
+1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/unix_numerically_adding_two_values/inputs/b
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/unix_numerically_adding_two_values/inputs/b b/taverna-commandline-tests/src/test/resources/myexperiment/unix_numerically_adding_two_values/inputs/b
new file mode 100644
index 0000000..d8263ee
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/unix_numerically_adding_two_values/inputs/b
@@ -0,0 +1 @@
+2
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/unix_numerically_adding_two_values/unix_numerically_adding_two_values.url
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/unix_numerically_adding_two_values/unix_numerically_adding_two_values.url b/taverna-commandline-tests/src/test/resources/myexperiment/unix_numerically_adding_two_values/unix_numerically_adding_two_values.url
new file mode 100644
index 0000000..72ef715
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/unix_numerically_adding_two_values/unix_numerically_adding_two_values.url
@@ -0,0 +1 @@
+http://www.myexperiment.org/workflows/2231/download/numerically_adding_two_values._763485.t2flow?version=1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/myexperiment/unix_tool_service_using_string_replacement/unix_tool_service_using_string_replacement.url
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/myexperiment/unix_tool_service_using_string_replacement/unix_tool_service_using_string_replacement.url b/taverna-commandline-tests/src/test/resources/myexperiment/unix_tool_service_using_string_replacement/unix_tool_service_using_string_replacement.url
new file mode 100644
index 0000000..155d7e4
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/myexperiment/unix_tool_service_using_string_replacement/unix_tool_service_using_string_replacement.url
@@ -0,0 +1 @@
+http://www.myexperiment.org/workflows/2229/download/unix_tool_service_using_string_replacement_219870.t2flow?version=1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/security/t2keystore.ubr
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/security/t2keystore.ubr b/taverna-commandline-tests/src/test/resources/security/t2keystore.ubr
new file mode 100644
index 0000000..c79eddf
Binary files /dev/null and b/taverna-commandline-tests/src/test/resources/security/t2keystore.ubr differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/security/t2truststore.ubr
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/security/t2truststore.ubr b/taverna-commandline-tests/src/test/resources/security/t2truststore.ubr
new file mode 100644
index 0000000..ec1717d
Binary files /dev/null and b/taverna-commandline-tests/src/test/resources/security/t2truststore.ubr differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/security/taverna-keystore.ubr
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/security/taverna-keystore.ubr b/taverna-commandline-tests/src/test/resources/security/taverna-keystore.ubr
new file mode 100644
index 0000000..c79eddf
Binary files /dev/null and b/taverna-commandline-tests/src/test/resources/security/taverna-keystore.ubr differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/security/taverna-truststore.ubr
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/security/taverna-truststore.ubr b/taverna-commandline-tests/src/test/resources/security/taverna-truststore.ubr
new file mode 100644
index 0000000..ec1717d
Binary files /dev/null and b/taverna-commandline-tests/src/test/resources/security/taverna-truststore.ubr differ

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/workflows/apiconsumer/apiconsumer.t2flow
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/workflows/apiconsumer/apiconsumer.t2flow b/taverna-commandline-tests/src/test/resources/workflows/apiconsumer/apiconsumer.t2flow
new file mode 100644
index 0000000..66ef4ac
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/workflows/apiconsumer/apiconsumer.t2flow
@@ -0,0 +1,178 @@
+<workflow xmlns="http://taverna.sf.net/2008/xml/t2flow" version="1" producedBy="taverna-2.3.0"><dataflow id="8bf2b5e5-a3e0-4fbd-bfd2-aefc7b2a6b8a" role="top"><name>Workflow4</name><inputPorts><port><name>in</name><depth>0</depth><granularDepth>0</granularDepth><annotations /></port></inputPorts><outputPorts><port><name>out</name><annotations /></port></outputPorts><processors><processor><name>String</name><inputPorts><port><name>string</name><depth>0</depth></port></inputPorts><outputPorts><port><name>object</name><depth>0</depth><granularDepth>0</granularDepth></port></outputPorts><annotations /><activities><activity><raven><group>net.sf.taverna.t2.activities</group><artifact>apiconsumer-activity</artifact><version>1.3</version></raven><class>net.sf.taverna.t2.activities.apiconsumer.ApiConsumerActivity</class><inputMap><map from="string" to="string" /></inputMap><outputMap><map from="object" to="object" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.apic
 onsumer.ApiConsumerActivityConfigurationBean xmlns="">
+  <inputs />
+  <outputs />
+  <classLoaderSharing>workflow</classLoaderSharing>
+  <localDependencies />
+  <artifactDependencies />
+  <apiConsumerName>No name</apiConsumerName>
+  <apiConsumerDescription>No description</apiConsumerDescription>
+  <description />
+  <className>java.lang.String</className>
+  <methodName>String</methodName>
+  <parameterNames>
+    <string>string</string>
+  </parameterNames>
+  <parameterDimensions>
+    <int>0</int>
+  </parameterDimensions>
+  <parameterTypes>
+    <string>java.lang.String</string>
+  </parameterTypes>
+  <returnType>java.lang.String</returnType>
+  <returnDimension>0</returnDimension>
+  <isMethodStatic>false</isMethodStatic>
+  <isMethodConstructor>true</isMethodConstructor>
+</net.sf.taverna.t2.activities.apiconsumer.ApiConsumerActivityConfigurationBean></configBean><annotations /></activity></activities><dispatchStack><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.3</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Parallelize</class><configBean encoding="xstream"><net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ParallelizeConfig xmlns="">
+  <maxJobs>1</maxJobs>
+</net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ParallelizeConfig></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.3</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ErrorBounce</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.3</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Failover</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.3</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Retry</class><configBean encoding="xstream"><net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.RetryConfig xmlns="
 ">
+  <backoffFactor>1.0</backoffFactor>
+  <initialDelay>1000</initialDelay>
+  <maxDelay>5000</maxDelay>
+  <maxRetries>0</maxRetries>
+</net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.RetryConfig></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.3</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Invoke</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer></dispatchStack><iterationStrategyStack><iteration><strategy><cross><port name="string" depth="0" /></cross></strategy></iteration></iterationStrategyStack></processor><processor><name>toUpperCase</name><inputPorts><port><name>object</name><depth>0</depth></port></inputPorts><outputPorts><port><name>result</name><depth>0</depth><granularDepth>0</granularDepth></port></outputPorts><annotations /><activities><activity><raven><group>net.sf.taverna.t2.activities</group><artifact>apiconsumer-activity</artifact><version>1.3</version></raven><class>net.sf.taverna.t2.activities.apiconsumer.ApiConsumerActivity</cl
 ass><inputMap><map from="object" to="object" /></inputMap><outputMap><map from="result" to="result" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.apiconsumer.ApiConsumerActivityConfigurationBean xmlns="">
+  <inputs />
+  <outputs />
+  <classLoaderSharing>workflow</classLoaderSharing>
+  <localDependencies />
+  <artifactDependencies />
+  <apiConsumerName>No name</apiConsumerName>
+  <apiConsumerDescription>No description</apiConsumerDescription>
+  <description />
+  <className>java.lang.String</className>
+  <methodName>toUpperCase</methodName>
+  <parameterNames />
+  <parameterDimensions />
+  <parameterTypes />
+  <returnType>java.lang.String</returnType>
+  <returnDimension>0</returnDimension>
+  <isMethodStatic>false</isMethodStatic>
+  <isMethodConstructor>false</isMethodConstructor>
+</net.sf.taverna.t2.activities.apiconsumer.ApiConsumerActivityConfigurationBean></configBean><annotations /></activity></activities><dispatchStack><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.3</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Parallelize</class><configBean encoding="xstream"><net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ParallelizeConfig xmlns="">
+  <maxJobs>1</maxJobs>
+</net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ParallelizeConfig></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.3</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ErrorBounce</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.3</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Failover</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.3</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Retry</class><configBean encoding="xstream"><net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.RetryConfig xmlns="
 ">
+  <backoffFactor>1.0</backoffFactor>
+  <initialDelay>1000</initialDelay>
+  <maxDelay>5000</maxDelay>
+  <maxRetries>0</maxRetries>
+</net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.RetryConfig></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.3</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Invoke</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer></dispatchStack><iterationStrategyStack><iteration><strategy><cross><port name="object" depth="0" /></cross></strategy></iteration></iterationStrategyStack></processor></processors><conditions /><datalinks><datalink><sink type="processor"><processor>String</processor><port>string</port></sink><source type="dataflow"><port>in</port></source></datalink><datalink><sink type="processor"><processor>toUpperCase</processor><port>object</port></sink><source type="processor"><processor>String</processor><port>object</port></source></datalink><datalink><sink type="dataflow"><port>out</port></sink><source type="proc
 essor"><processor>toUpperCase</processor><port>result</port></source></datalink></datalinks><annotations><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+  <annotationAssertions>
+    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
+        <identification>483d65c6-98c1-4b94-b628-d5bcbf351e97</identification>
+      </annotationBean>
+      <date>2011-05-16 13:07:03.385 BST</date>
+      <creators />
+      <curationEventList />
+    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+  </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+  <annotationAssertions>
+    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
+        <identification>d460e60a-43bb-47fc-a9f4-89e15274b100</identification>
+      </annotationBean>
+      <date>2011-11-02 12:43:09.911 GMT</date>
+      <creators />
+      <curationEventList />
+    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+  </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+  <annotationAssertions>
+    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
+        <identification>0d977496-aa5d-4274-9827-85400d5f13a2</identification>
+      </annotationBean>
+      <date>2011-05-16 13:06:33.69 BST</date>
+      <creators />
+      <curationEventList />
+    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+  </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+  <annotationAssertions>
+    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
+        <identification>8bf2b5e5-a3e0-4fbd-bfd2-aefc7b2a6b8a</identification>
+      </annotationBean>
+      <date>2011-11-02 12:46:41.313 GMT</date>
+      <creators />
+      <curationEventList />
+    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+  </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+  <annotationAssertions>
+    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
+        <identification>58f30a52-57df-46ce-b1bb-b9533984f8dd</identification>
+      </annotationBean>
+      <date>2011-11-02 12:29:15.575 GMT</date>
+      <creators />
+      <curationEventList />
+    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+  </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+  <annotationAssertions>
+    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
+        <identification>c2693c41-1373-48cf-afbe-d8bbe0ea9e35</identification>
+      </annotationBean>
+      <date>2011-11-02 12:31:01.678 GMT</date>
+      <creators />
+      <curationEventList />
+    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+  </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+  <annotationAssertions>
+    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
+        <identification>1ce7f3a0-71f4-4794-8bbd-dbb6de42442d</identification>
+      </annotationBean>
+      <date>2011-05-16 12:57:01.975 BST</date>
+      <creators />
+      <curationEventList />
+    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+  </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+  <annotationAssertions>
+    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
+        <identification>4c2b6995-eecb-47a7-b72c-63cfb96b6852</identification>
+      </annotationBean>
+      <date>2011-11-02 12:43:51.355 GMT</date>
+      <creators />
+      <curationEventList />
+    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+  </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+  <annotationAssertions>
+    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
+        <identification>225db881-4e07-4cdb-920c-343dc1536edc</identification>
+      </annotationBean>
+      <date>2011-05-16 13:10:54.588 BST</date>
+      <creators />
+      <curationEventList />
+    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+  </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+  <annotationAssertions>
+    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
+        <identification>404e203c-ce51-4a9f-907c-1dab7f2eaaa2</identification>
+      </annotationBean>
+      <date>2011-05-16 12:44:02.533 BST</date>
+      <creators />
+      <curationEventList />
+    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+  </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+  <annotationAssertions>
+    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
+        <identification>0b6881f1-aa8d-483e-a7bb-7ad38b1da778</identification>
+      </annotationBean>
+      <date>2011-05-16 12:26:38.721 BST</date>
+      <creators />
+      <curationEventList />
+    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+  </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2></annotations></dataflow></workflow>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/workflows/apiconsumer/inputs/in
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/workflows/apiconsumer/inputs/in b/taverna-commandline-tests/src/test/resources/workflows/apiconsumer/inputs/in
new file mode 100644
index 0000000..fede229
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/workflows/apiconsumer/inputs/in
@@ -0,0 +1 @@
+test-input
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/workflows/beanshell/beanshell.t2flow
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/workflows/beanshell/beanshell.t2flow b/taverna-commandline-tests/src/test/resources/workflows/beanshell/beanshell.t2flow
new file mode 100644
index 0000000..8c5968c
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/workflows/beanshell/beanshell.t2flow
@@ -0,0 +1,137 @@
+<workflow xmlns="http://taverna.sf.net/2008/xml/t2flow" version="1" producedBy="taverna-2.2.0"><dataflow id="78cb1427-d57f-42c2-a385-1d20c1580f3b" role="top"><name>Workflow13</name><inputPorts><port><name>in</name><depth>0</depth><granularDepth>0</granularDepth><annotations /></port></inputPorts><outputPorts><port><name>out</name><annotations /></port></outputPorts><processors><processor><name>Echo</name><inputPorts><port><name>in</name><depth>0</depth></port></inputPorts><outputPorts><port><name>out</name><depth>0</depth><granularDepth>0</granularDepth></port></outputPorts><annotations /><activities><activity><raven><group>net.sf.taverna.t2.activities</group><artifact>beanshell-activity</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.activities.beanshell.BeanshellActivity</class><inputMap><map from="in" to="in" /></inputMap><outputMap><map from="out" to="out" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.beanshell.BeanshellActivityConfi
 gurationBean xmlns="">
+  <script>out=in;</script>
+  <dependencies />
+  <classLoaderSharing>workflow</classLoaderSharing>
+  <localDependencies />
+  <artifactDependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>in</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>text/plain</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>0</granularDepth>
+      <name>out</name>
+      <depth>0</depth>
+      <mimeTypes />
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.beanshell.BeanshellActivityConfigurationBean></configBean><annotations /></activity></activities><dispatchStack><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Parallelize</class><configBean encoding="xstream"><net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ParallelizeConfig xmlns="">
+  <maxJobs>1</maxJobs>
+</net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ParallelizeConfig></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ErrorBounce</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Failover</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Retry</class><configBean encoding="xstream"><net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.RetryConfig xmlns="
 ">
+  <backoffFactor>1.0</backoffFactor>
+  <initialDelay>1000</initialDelay>
+  <maxDelay>5000</maxDelay>
+  <maxRetries>0</maxRetries>
+</net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.RetryConfig></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Invoke</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer></dispatchStack><iterationStrategyStack><iteration><strategy><cross><port name="in" depth="0" /></cross></strategy></iteration></iterationStrategyStack></processor><processor><name>ListGenerator</name><inputPorts><port><name>in</name><depth>0</depth></port></inputPorts><outputPorts><port><name>out</name><depth>1</depth><granularDepth>1</granularDepth></port></outputPorts><annotations /><activities><activity><raven><group>net.sf.taverna.t2.activities</group><artifact>beanshell-activity</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.activities.beanshell.BeanshellActivity</class><inputMap><
 map from="in" to="in" /></inputMap><outputMap><map from="out" to="out" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.beanshell.BeanshellActivityConfigurationBean xmlns="">
+  <script>out = new ArrayList();
+
+for (int i = 0; i &lt; 1000; i++) {
+  out.add(in + ":" + i);
+}</script>
+  <dependencies />
+  <classLoaderSharing>workflow</classLoaderSharing>
+  <localDependencies />
+  <artifactDependencies />
+  <inputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+      <handledReferenceSchemes />
+      <translatedElementType>java.lang.String</translatedElementType>
+      <allowsLiteralValues>true</allowsLiteralValues>
+      <name>in</name>
+      <depth>0</depth>
+      <mimeTypes>
+        <string>text/plain</string>
+      </mimeTypes>
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+  </inputs>
+  <outputs>
+    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+      <granularDepth>1</granularDepth>
+      <name>out</name>
+      <depth>1</depth>
+      <mimeTypes />
+    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+  </outputs>
+</net.sf.taverna.t2.activities.beanshell.BeanshellActivityConfigurationBean></configBean><annotations /></activity></activities><dispatchStack><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Parallelize</class><configBean encoding="xstream"><net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ParallelizeConfig xmlns="">
+  <maxJobs>1</maxJobs>
+</net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ParallelizeConfig></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ErrorBounce</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Failover</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Retry</class><configBean encoding="xstream"><net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.RetryConfig xmlns="
 ">
+  <backoffFactor>1.0</backoffFactor>
+  <initialDelay>1000</initialDelay>
+  <maxDelay>5000</maxDelay>
+  <maxRetries>0</maxRetries>
+</net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.RetryConfig></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Invoke</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer></dispatchStack><iterationStrategyStack><iteration><strategy><cross><port name="in" depth="0" /></cross></strategy></iteration></iterationStrategyStack></processor></processors><conditions /><datalinks><datalink><sink type="processor"><processor>Echo</processor><port>in</port></sink><source type="processor"><processor>ListGenerator</processor><port>out</port></source></datalink><datalink><sink type="processor"><processor>ListGenerator</processor><port>in</port></sink><source type="dataflow"><port>in</port></source></datalink><datalink><sink type="dataflow"><port>out</port></sink><source type="processor"><
 processor>Echo</processor><port>out</port></source></datalink></datalinks><annotations><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+  <annotationAssertions>
+    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
+        <identification>13c70169-dfaa-4ea6-b6ab-3551dae7fa84</identification>
+      </annotationBean>
+      <date>2010-08-19 12:28:57.881 BST</date>
+      <creators />
+      <curationEventList />
+    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+  </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+  <annotationAssertions>
+    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
+        <identification>7ef10e93-7376-41a9-9255-552149094142</identification>
+      </annotationBean>
+      <date>2010-08-31 13:06:57.536 BST</date>
+      <creators />
+      <curationEventList />
+    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+  </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+  <annotationAssertions>
+    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
+        <identification>3b7c0b9c-572d-466b-af6d-0fb40699e8a5</identification>
+      </annotationBean>
+      <date>2010-08-31 12:50:40.306 BST</date>
+      <creators />
+      <curationEventList />
+    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+  </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+  <annotationAssertions>
+    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
+        <identification>eb6a550d-f34e-4de9-b0fc-1b3df8ab36c4</identification>
+      </annotationBean>
+      <date>2010-08-31 14:32:44.634 BST</date>
+      <creators />
+      <curationEventList />
+    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+  </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+  <annotationAssertions>
+    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
+        <identification>78cb1427-d57f-42c2-a385-1d20c1580f3b</identification>
+      </annotationBean>
+      <date>2010-08-31 14:36:00.297 BST</date>
+      <creators />
+      <curationEventList />
+    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+  </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.AnnotationChainImpl xmlns="">
+  <annotationAssertions>
+    <net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+      <annotationBean class="net.sf.taverna.t2.annotation.annotationbeans.IdentificationAssertion">
+        <identification>ad638364-a6e0-4852-abca-9f609c9553d2</identification>
+      </annotationBean>
+      <date>2010-08-19 13:43:43.797 BST</date>
+      <creators />
+      <curationEventList />
+    </net.sf.taverna.t2.annotation.AnnotationAssertionImpl>
+  </annotationAssertions>
+</net.sf.taverna.t2.annotation.AnnotationChainImpl></annotation_chain_2_2></annotations></dataflow></workflow>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-commandline/blob/53c8a6c1/taverna-commandline-tests/src/test/resources/workflows/beanshell/inputs/in
----------------------------------------------------------------------
diff --git a/taverna-commandline-tests/src/test/resources/workflows/beanshell/inputs/in b/taverna-commandline-tests/src/test/resources/workflows/beanshell/inputs/in
new file mode 100644
index 0000000..fede229
--- /dev/null
+++ b/taverna-commandline-tests/src/test/resources/workflows/beanshell/inputs/in
@@ -0,0 +1 @@
+test-input
\ No newline at end of file