You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@falcon.apache.org by aj...@apache.org on 2016/01/06 12:41:04 UTC

falcon git commit: FALCON-1698 New tests for ProcessSetupTest, ClusterSetupTest, UI test fixes. Contributed by Paul Isaychuk.

Repository: falcon
Updated Branches:
  refs/heads/master ccb6df38b -> eeb7ff081


FALCON-1698 New tests for ProcessSetupTest, ClusterSetupTest, UI test fixes. Contributed by Paul Isaychuk.


Project: http://git-wip-us.apache.org/repos/asf/falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/falcon/commit/eeb7ff08
Tree: http://git-wip-us.apache.org/repos/asf/falcon/tree/eeb7ff08
Diff: http://git-wip-us.apache.org/repos/asf/falcon/diff/eeb7ff08

Branch: refs/heads/master
Commit: eeb7ff081e905040cf98796f86361e63dd89fae1
Parents: ccb6df3
Author: Ajay Yadava <aj...@gmail.com>
Authored: Wed Jan 6 17:08:56 2016 +0530
Committer: Ajay Yadava <aj...@gmail.com>
Committed: Wed Jan 6 17:08:56 2016 +0530

----------------------------------------------------------------------
 falcon-regression/CHANGES.txt                   |  4 +-
 .../regression/Entities/ClusterMerlin.java      |  8 ++-
 .../regression/Entities/ProcessMerlin.java      |  3 ++
 .../falcon/regression/core/bundle/Bundle.java   |  2 +-
 .../regression/ui/search/ClusterWizardPage.java | 55 ++++++++++++++------
 .../falcon/regression/ui/search/EntityPage.java |  4 ++
 .../falcon/regression/ui/search/PageHeader.java | 18 ++++---
 .../regression/ui/search/ProcessWizardPage.java | 17 +++++-
 .../regression/searchUI/ClusterSetupTest.java   | 28 ++++++++--
 .../regression/searchUI/MirrorSummaryTest.java  |  4 +-
 .../regression/searchUI/ProcessSetupTest.java   | 25 ++++++++-
 11 files changed, 133 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/falcon/blob/eeb7ff08/falcon-regression/CHANGES.txt
----------------------------------------------------------------------
diff --git a/falcon-regression/CHANGES.txt b/falcon-regression/CHANGES.txt
index c083c2c..1888401 100644
--- a/falcon-regression/CHANGES.txt
+++ b/falcon-regression/CHANGES.txt
@@ -5,7 +5,7 @@ Trunk (Unreleased)
   INCOMPATIBLE CHANGES
 
   NEW FEATURES
-   FALCON-1697 Stabilization of scenarios which are based on instances lifecycle(Paul Isaychuk via Ajay Yadava)
+   FALCON-1698 New tests for ProcessSetupTest, ClusterSetupTest, UI test fixes(Paul Isaychuk via Ajay Yadava)
 
    FALCON-1700 Add new test cases to HiveDRTest(Paul Isaychuk & Murali Ramasami via Ajay Yadava)
 
@@ -113,6 +113,8 @@ Trunk (Unreleased)
    via Samarth Gupta)
 
   IMPROVEMENTS
+   FALCON-1697 Stabilization of scenarios which are based on instances lifecycle(Paul Isaychuk via Ajay Yadava)
+
    FALCON-1543 Upgrade Falcon regression to use Active MQ 5.12(Pragya Mittal via Pallavi Rao)
 
    FALCON-1502 Checkstyle failures in Falcon Regression(Pragya Mittal via Ajay Yadava)

http://git-wip-us.apache.org/repos/asf/falcon/blob/eeb7ff08/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/Entities/ClusterMerlin.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/Entities/ClusterMerlin.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/Entities/ClusterMerlin.java
index fe1338a..1d25d12 100644
--- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/Entities/ClusterMerlin.java
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/Entities/ClusterMerlin.java
@@ -19,6 +19,7 @@
 package org.apache.falcon.regression.Entities;
 
 import org.apache.commons.beanutils.PropertyUtils;
+import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang.exception.ExceptionUtils;
 import org.apache.falcon.entity.v0.EntityType;
 import org.apache.falcon.entity.v0.cluster.ACL;
@@ -92,12 +93,15 @@ public class ClusterMerlin extends Cluster {
         this.setACL(acl);
     }
 
-    public void setInterface(Interfacetype interfacetype, String value) {
+    public void setInterface(Interfacetype interfacetype, String endpoint, String version) {
         final Interfaces interfaces = this.getInterfaces();
         final List<Interface> interfaceList = interfaces.getInterfaces();
         for (final Interface anInterface : interfaceList) {
             if (anInterface.getType() == interfacetype) {
-                anInterface.setEndpoint(value);
+                anInterface.setEndpoint(endpoint);
+                if (StringUtils.isNotBlank(version)) {
+                    anInterface.setVersion(version);
+                }
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/falcon/blob/eeb7ff08/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/Entities/ProcessMerlin.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/Entities/ProcessMerlin.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/Entities/ProcessMerlin.java
index 7607aa6..fb76da1 100644
--- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/Entities/ProcessMerlin.java
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/Entities/ProcessMerlin.java
@@ -575,6 +575,9 @@ public class ProcessMerlin extends Process {
             softAssert.assertEquals(newProcess.getInputs().getInputs().get(i).getEnd(),
                 getInputs().getInputs().get(i).getEnd(),
                 "Process Input End is different");
+            softAssert.assertEquals(newProcess.getInputs().getInputs().get(i).isOptional(),
+                getInputs().getInputs().get(i).isOptional(),
+                "Process Input optional param is different");
         }
         softAssert.assertAll();
     }

http://git-wip-us.apache.org/repos/asf/falcon/blob/eeb7ff08/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/bundle/Bundle.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/bundle/Bundle.java b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/bundle/Bundle.java
index 67d9ee2..9758d12 100644
--- a/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/bundle/Bundle.java
+++ b/falcon-regression/merlin-core/src/main/java/org/apache/falcon/regression/core/bundle/Bundle.java
@@ -559,7 +559,7 @@ public class Bundle {
 
     public void setClusterInterface(Interfacetype interfacetype, String value) {
         ClusterMerlin c = getClusterElement();
-        c.setInterface(interfacetype, value);
+        c.setInterface(interfacetype, value, null);
         writeClusterElement(c);
     }
 

http://git-wip-us.apache.org/repos/asf/falcon/blob/eeb7ff08/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/ui/search/ClusterWizardPage.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/ui/search/ClusterWizardPage.java b/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/ui/search/ClusterWizardPage.java
index bcada4a..f19fc23 100644
--- a/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/ui/search/ClusterWizardPage.java
+++ b/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/ui/search/ClusterWizardPage.java
@@ -138,12 +138,19 @@ public class ClusterWizardPage extends EntityWizardPage {
      * Common method to fill interfaces.
      */
     public void setInterface(Interface iface) {
-        String root = String.format("//div[contains(., '%s')]", iface.getType().value());
-        String xpath = root + "/div/input[contains(@ng-model, '%s')]";
-        WebElement ifaceEndpoint = clusterBox.findElement(By.xpath(String.format(xpath, "_interface._endpoint")));
-        WebElement ifaceVersion = clusterBox.findElement(By.xpath(String.format(xpath, "_interface._version")));
+        String xpath = "//input[contains(@ng-model,"
+            + " 'clusterEntity.clusterModel.cluster.interfaces.interface[%sPos]._endpoint')]";
+        WebElement ifaceEndpoint = clusterBox.findElement(By.xpath(String.format(xpath, iface.getType().value())));
         ifaceEndpoint.clear();
         sendKeysSlowly(ifaceEndpoint, iface.getEndpoint());
+        setInterfaceVersion(iface);
+    }
+
+    /**
+     * Set interface version by interface type.
+     */
+    public void setInterfaceVersion(Interface iface) {
+        WebElement ifaceVersion = getInterfaceVersionInput(iface.getType());
         if (iface.getVersion() != null) {
             ifaceVersion.clear();
             sendKeysSlowly(ifaceVersion, iface.getVersion());
@@ -151,6 +158,15 @@ public class ClusterWizardPage extends EntityWizardPage {
     }
 
     /**
+     * Get input for interface version by interface type.
+     */
+    private WebElement getInterfaceVersionInput(Interfacetype interfacetype) {
+        return clusterBox.findElement(By.xpath(String.format(
+            "//input[@ng-model='clusterEntity.clusterModel.cluster.interfaces.interface[%sPos]._version']",
+            interfacetype.value())));
+    }
+
+    /**
      * Populates form with tags.
      */
     public void setTags(String tagsStr){
@@ -199,7 +215,7 @@ public class ClusterWizardPage extends EntityWizardPage {
         List<WebElement> valueInputs = clusterBox.findElements(By.xpath("//input[@ng-model='property._value']"));
         WebElement propInput = propInputs.get(propInputs.size()-1);
         sendKeysSlowly(propInput, name);
-        WebElement valueInput = valueInputs.get(valueInputs.size()-1);
+        WebElement valueInput = valueInputs.get(valueInputs.size() - 1);
         sendKeysSlowly(valueInput, value);
         clickAddProperty();
     }
@@ -418,25 +434,32 @@ public class ClusterWizardPage extends EntityWizardPage {
         waitForAngularToFinish();
     }
 
-    public String getInterfaceEndpoint(Interfacetype interfacetype) {
-        String xpath = String.format("(//input[@ng-model='_interface._endpoint'])[%s]", interfacetype.ordinal() + 1);
-        WebElement endpoint = clusterBox.findElement(By.xpath(xpath));
-        return endpoint.getAttribute("value");
+    public WebElement getInterfaceEndpoint(Interfacetype interfacetype) {
+        String xpath = String.format("//input[@ng-model='clusterEntity.clusterModel.cluster.interfaces"
+            + ".interface[%sPos]._endpoint']", interfacetype.value());
+        return clusterBox.findElement(By.xpath(xpath));
+    }
+
+    public String getInterfaceEndpointValue(Interfacetype interfacetype) {
+        return getInterfaceEndpoint(interfacetype).getAttribute("value");
+    }
+
+    public WebElement getInterfaceVersion(Interfacetype interfacetype) {
+        String xpath = String.format("//input[@ng-model='clusterEntity.clusterModel.cluster.interfaces"
+            + ".interface[%sPos]._version']", interfacetype.value());
+        return clusterBox.findElement(By.xpath(xpath));
     }
 
-    public String getInterfaceVersion(Interfacetype interfacetype) {
-        String xpath = String.format("(//input[@ng-model='_interface._version'])[%s]", interfacetype.ordinal() + 1);
-        WebElement version = clusterBox.findElement(By.xpath(xpath));
-        return version.getAttribute("value");
+    public String getInterfaceVersionValue(Interfacetype interfacetype) {
+        return getInterfaceVersion(interfacetype).getAttribute("value");
     }
 
     /**
      * Checks whether registry interface is enabled for input or not.
      */
     public boolean isRegistryEnabled() {
-        WebElement endpoint = clusterBox.findElement(By.xpath("(//input[@ng-model='_interface._endpoint'])[6]"));
-        WebElement version = clusterBox.findElement(By.xpath("(//input[@ng-model='_interface._version'])[6]"));
-        return endpoint.isEnabled() && version.isEnabled();
+        return getInterfaceEndpoint(Interfacetype.REGISTRY).isEnabled()
+            && getInterfaceVersion(Interfacetype.REGISTRY).isEnabled();
     }
 
     private WebElement getNameUnavailable(){

http://git-wip-us.apache.org/repos/asf/falcon/blob/eeb7ff08/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/ui/search/EntityPage.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/ui/search/EntityPage.java b/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/ui/search/EntityPage.java
index f7499b7..98bf9b5 100644
--- a/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/ui/search/EntityPage.java
+++ b/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/ui/search/EntityPage.java
@@ -30,6 +30,7 @@ import org.apache.falcon.entity.v0.process.Output;
 import org.apache.falcon.entity.v0.process.Retry;
 import org.apache.falcon.regression.Entities.FeedMerlin;
 import org.apache.falcon.regression.Entities.ProcessMerlin;
+import org.apache.falcon.regression.core.util.TimeUtil;
 import org.apache.falcon.regression.core.util.UIAssert;
 import org.apache.falcon.resource.InstancesResult;
 import org.apache.log4j.Logger;
@@ -401,9 +402,12 @@ public class EntityPage extends AbstractSearchPage {
             softAssert.assertAll();
         }
     }
+
     public void performActionOnSelectedInstances(InstanceAction instanceAction) {
         driver.findElement(By.xpath(String.format("//td/div[%d]", instanceAction.ordinal() + 1))).click();
         waitForAngularToFinish();
+        //timeout to refresh a view
+        TimeUtil.sleepSeconds(2);
     }
 
     public InstanceSummary getInstanceSummary() {

http://git-wip-us.apache.org/repos/asf/falcon/blob/eeb7ff08/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/ui/search/PageHeader.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/ui/search/PageHeader.java b/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/ui/search/PageHeader.java
index 7f87091..61d9475 100644
--- a/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/ui/search/PageHeader.java
+++ b/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/ui/search/PageHeader.java
@@ -89,13 +89,11 @@ public class PageHeader {
     private WebElement mirrorCreateButton;
 
     @FindBys({
-        @FindBy(className = "navbar"),
-        @FindBy(className = "uploadNavWrapper")
+        @FindBy(className = "uploadNavWrapper"),
     })
     private WebElement uploadEntityBox;
 
     @FindBys({
-        @FindBy(className = "navbar"),
         @FindBy(className = "uploadNavWrapper"),
         @FindBy(className = "btn-file")
     })
@@ -153,7 +151,6 @@ public class PageHeader {
             final WebElement uploadEntityLabel = uploadEntityBox.findElement(By.tagName("h4"));
             Assert.assertEquals(uploadEntityLabel.getText(), "Upload an entity",
                 "Unexpected upload entity text");
-            UIAssert.assertDisplayed(uploadEntityButton, "Create entity box");
             Assert.assertEquals(uploadEntityButton.getText(), "Browse for the XML file",
                 "Unexpected text on upload entity button");
             //checking if logged-in username is displayed
@@ -180,14 +177,23 @@ public class PageHeader {
 
         //help link navigation
         Assert.assertEquals(helpLink.getText(), "Help", "Help link expected to have text 'Help'");
-        helpLink.click();
-        new WebDriverWait(driver, AbstractSearchPage.PAGELOAD_TIMEOUT_THRESHOLD).until(
+        clickLink(helpLink);
+        int helpPageloadTimeoutThreshold = 30;
+        new WebDriverWait(driver, helpPageloadTimeoutThreshold).until(
             ExpectedConditions.stalenessOf(helpLink));
         Assert.assertEquals(driver.getCurrentUrl(), MerlinConstants.HELP_URL,
             "Unexpected help url");
         driver.get(oldUrl);
     }
 
+    /**
+     * Useful in cases when selenium fails to click a link due to it's bugs.
+     */
+    private void clickLink(WebElement link) {
+        JavascriptExecutor executor = (JavascriptExecutor) driver;
+        executor.executeScript("arguments[0].click();", link);
+    }
+
     public void uploadXml(String filePath) throws IOException {
         final WebElement uploadEntityTextBox = uploadEntityBox.findElement(By.id("files"));
         uploadEntityTextBox.sendKeys(filePath);

http://git-wip-us.apache.org/repos/asf/falcon/blob/eeb7ff08/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/ui/search/ProcessWizardPage.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/ui/search/ProcessWizardPage.java b/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/ui/search/ProcessWizardPage.java
index 5dcd700..8fcc5b7 100644
--- a/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/ui/search/ProcessWizardPage.java
+++ b/falcon-regression/merlin/src/main/java/org/apache/falcon/regression/ui/search/ProcessWizardPage.java
@@ -694,9 +694,18 @@ public class ProcessWizardPage extends EntityWizardPage {
             getInputFeed(i).selectByVisibleText(inputs.getInputs().get(i).getFeed());
             sendKeysSlowly(getInputStart(i), inputs.getInputs().get(i).getStart());
             sendKeysSlowly(getInputEnd(i), inputs.getInputs().get(i).getEnd());
+            clickCheckBoxSecurely(getOptionalCheckbox(), inputs.getInputs().get(i).isOptional());
         }
     }
 
+    private WebElement getOptionalCheckbox() {
+        return formBox.findElement(By.xpath("//input[@ng-model='input.optional']"));
+    }
+
+    public boolean isOptionalSelected() {
+        return getOptionalCheckbox().isSelected();
+    }
+
     public void clickAddInput(){
         waitForAngularToFinish();
         getAddInputButton().click();
@@ -832,7 +841,7 @@ public class ProcessWizardPage extends EntityWizardPage {
     public ProcessMerlin getProcessFromSummaryBox(ProcessMerlin draft) {
         String text = summaryBox.getText().trim();
         draft.setName(getProperty(text, null, "Tags", 2));
-        String currentBlock = text.substring(text.indexOf("Tags"), text.indexOf("Workflow"));
+        String currentBlock = text.substring(text.indexOf("Tags"), text.indexOf("Access Control List"));
         String [] parts;
         parts = currentBlock.trim().split("\\n");
         String tags = "";
@@ -846,6 +855,7 @@ public class ProcessWizardPage extends EntityWizardPage {
         if (!tags.isEmpty()) {
             draft.setTags(tags);
         }
+
         Workflow workflow = new Workflow();
         workflow.setName(getProperty(text, "Workflow", "Engine", 2));
         workflow.setEngine(EngineType.fromValue(getProperty(text, "Engine", "Version", 1)));
@@ -859,6 +869,11 @@ public class ProcessWizardPage extends EntityWizardPage {
         draft.setParallel(Integer.parseInt(getProperty(text, "Max. parallel instances", "Order", 1)));
         draft.setOrder(ExecutionType.fromValue(getProperty(text, "Order", "Retry", 1)));
 
+        String aclOwner = getProperty(text, "Owner", "Group", 1);
+        String aclGroup = getProperty(text, "Group", "Permissions", 1);
+        String aclPermission = getProperty(text, "Permissions", "Workflow", 1);
+        draft.setACL(aclOwner, aclGroup, aclPermission);
+
         Retry retry = new Retry();
         retry.setPolicy(PolicyType.fromValue(getProperty(text, "Retry", "Attempts", 2)));
         retry.setAttempts(Integer.parseInt(getProperty(text, "Attempts", "Delay", 1)));

http://git-wip-us.apache.org/repos/asf/falcon/blob/eeb7ff08/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/searchUI/ClusterSetupTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/searchUI/ClusterSetupTest.java b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/searchUI/ClusterSetupTest.java
index 5efa5b2..e0b69e1 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/searchUI/ClusterSetupTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/searchUI/ClusterSetupTest.java
@@ -226,6 +226,26 @@ public class ClusterSetupTest extends BaseUITestClass{
     }
 
     /**
+     * Check that interface version with different length and parts is allowed.
+     */
+    @Test
+    public void testDifferentInterfaceVersions() {
+        sourceCluster.addInterface(Interfacetype.REGISTRY, "http://colo-1.example.com:15000", "1.1.1");
+        clusterSetup.checkRegistry(true);
+        clusterSetup.fillForm(sourceCluster);
+        StringBuilder partialVersion = new StringBuilder("");
+        for (String c : new String[]{"3", ".", "2", ".", "0"}) {
+            partialVersion.append(c);
+            for (Interface inface : sourceCluster.getInterfaces().getInterfaces()) {
+                inface.setVersion(partialVersion.toString());
+                clusterSetup.setInterfaceVersion(inface);
+            }
+            clusterSetup.clickNext();
+            clusterSetup.clickPrevious();
+        }
+    }
+
+    /**
      * Populate working location with value pointing to directory with wider permissions then 755.
      * Check that user is not allowed to create a cluster and is notified with an alert.
      */
@@ -287,9 +307,9 @@ public class ClusterSetupTest extends BaseUITestClass{
     public void testEditXml() {
         clusterSetup.fillForm(sourceCluster);
         //check that registry is empty
-        String registryEndpoint = clusterSetup.getInterfaceEndpoint(Interfacetype.REGISTRY);
+        String registryEndpoint = clusterSetup.getInterfaceEndpointValue(Interfacetype.REGISTRY);
         Assert.assertTrue(StringUtils.isEmpty(registryEndpoint), "Registry endpoint should be empty");
-        String registryVersion = clusterSetup.getInterfaceVersion(Interfacetype.REGISTRY);
+        String registryVersion = clusterSetup.getInterfaceVersionValue(Interfacetype.REGISTRY);
         Assert.assertTrue(StringUtils.isEmpty(registryVersion), "Registry version should be empty");
         Assert.assertFalse(clusterSetup.isRegistryEnabled(), "Registry should be disabled.");
 
@@ -306,10 +326,10 @@ public class ClusterSetupTest extends BaseUITestClass{
         clusterSetup.setXmlPreview(sourceCluster.toString());
 
         //check values on wizard
-        registryEndpoint = clusterSetup.getInterfaceEndpoint(Interfacetype.REGISTRY);
+        registryEndpoint = clusterSetup.getInterfaceEndpointValue(Interfacetype.REGISTRY);
         Assert.assertEquals(registryEndpoint, sourceCluster.getInterfaces().getInterfaces().get(5).getEndpoint(),
             "Registry endpoint on wizard should match to endpoint on preview xml.");
-        registryVersion = clusterSetup.getInterfaceVersion(Interfacetype.REGISTRY);
+        registryVersion = clusterSetup.getInterfaceVersionValue(Interfacetype.REGISTRY);
         Assert.assertEquals(registryVersion, sourceCluster.getInterfaces().getInterfaces().get(5).getVersion(),
             "Registry version on wizard should match to endpoint on preview xml.");
         Assert.assertTrue(clusterSetup.isRegistryEnabled(), "Registry should be enabled.");

http://git-wip-us.apache.org/repos/asf/falcon/blob/eeb7ff08/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/searchUI/MirrorSummaryTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/searchUI/MirrorSummaryTest.java b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/searchUI/MirrorSummaryTest.java
index 989e4b3..0a788f0 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/searchUI/MirrorSummaryTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/searchUI/MirrorSummaryTest.java
@@ -165,7 +165,7 @@ public class MirrorSummaryTest extends BaseUITestClass{
         mirrorPage.setHdfsMaxBandwidth("50");
         mirrorPage.setAclOwner("somebody");
         mirrorPage.setAclGroup("somegroup");
-        mirrorPage.setAclPermission("0x000");
+        mirrorPage.setAclPermission("0000");
         mirrorPage.setFrequency(new Frequency("8", Frequency.TimeUnit.hours));
         Retry retry = new Retry();
         retry.setAttempts(8);
@@ -180,7 +180,7 @@ public class MirrorSummaryTest extends BaseUITestClass{
         Map<Summary, String> expectedParams = new EnumMap<>(baseMap);
         expectedParams.put(Summary.ACL_OWNER, "somebody");
         expectedParams.put(Summary.ACL_GROUP, "somegroup");
-        expectedParams.put(Summary.ACL_PERMISSIONS, "0x000");
+        expectedParams.put(Summary.ACL_PERMISSIONS, "0000");
         expectedParams.put(Summary.MAX_MAPS, "9");
         expectedParams.put(Summary.MAX_BANDWIDTH, "50");
         expectedParams.put(Summary.FREQUENCY, "8 hours");

http://git-wip-us.apache.org/repos/asf/falcon/blob/eeb7ff08/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/searchUI/ProcessSetupTest.java
----------------------------------------------------------------------
diff --git a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/searchUI/ProcessSetupTest.java b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/searchUI/ProcessSetupTest.java
index eae5137..d78bc8f 100644
--- a/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/searchUI/ProcessSetupTest.java
+++ b/falcon-regression/merlin/src/test/java/org/apache/falcon/regression/searchUI/ProcessSetupTest.java
@@ -785,6 +785,9 @@ public class ProcessSetupTest extends BaseUITestClass {
         Assert.assertEquals(processWizardPage.getInputEndText(0), process.getInputs().getInputs().get(0).getEnd(),
             "Unexpected Input End on the Wizard window");
 
+        //assert that optional checkbox is not checked
+        Assert.assertFalse(processWizardPage.isOptionalSelected(), "Optional checkbox shouldn't be selected.");
+
         // Get process from XML Preview
         ProcessMerlin processFromXML = processWizardPage.getEntityFromXMLPreview();
 
@@ -792,8 +795,9 @@ public class ProcessSetupTest extends BaseUITestClass {
         LOGGER.info(String.format("Comparing source process: %n%s%n and preview: %n%s%n.", process, processFromXML));
         process.assertInputValues(processFromXML);
 
-        // Change Input Name and Set Output in the XML
+        // Change Input Name, make it optional, set Output in the XML
         processFromXML.getInputs().getInputs().get(0).setName("newInputData");
+        processFromXML.getInputs().getInputs().get(0).setOptional(true);
         processFromXML.setOutputs(process.getOutputs());
 
         // Now click EditXML and set the updated XML here
@@ -812,6 +816,16 @@ public class ProcessSetupTest extends BaseUITestClass {
         Assert.assertEquals(processWizardPage.getOutputInstanceText(0),
             process.getOutputs().getOutputs().get(0).getInstance(),
             "Unexpected Output Instance on the Wizard window");
+
+        //assert that optional checkbox is selected
+        Assert.assertTrue(processWizardPage.isOptionalSelected(), "Optional checkbox should be selected.");
+
+        //make input compulsory again
+        processFromXML.getInputs().getInputs().get(0).setOptional(false);
+        processWizardPage.setXmlPreview(processFromXML.toString());
+
+        //assert that optional checkbox isn't  selected
+        Assert.assertFalse(processWizardPage.isOptionalSelected(), "Optional checkbox shouldn't be selected.");
     }
 
     /**
@@ -898,10 +912,11 @@ public class ProcessSetupTest extends BaseUITestClass {
 
     /**
      * Create process. Using API check that process was created.
-     * @throws Exception
+     * Additionally check that process input was set optional.
      */
     @Test
     public void testSummaryStepDefaultScenario() throws Exception{
+        process.getInputs().getInputs().get(0).setOptional(true);
 
         bundles[0].submitClusters(cluster);
         bundles[0].submitFeeds(prism);
@@ -930,6 +945,12 @@ public class ProcessSetupTest extends BaseUITestClass {
         // Assert the response using API to validate if the feed creation went successfully
         ServiceResponse response = prism.getProcessHelper().getEntityDefinition(process.toString());
         AssertUtil.assertSucceeded(response);
+
+        //particular check for optional param
+        ProcessMerlin submittedProcess = new ProcessMerlin(response.getMessage());
+        LOGGER.info(
+            String.format("Comparing source process: %n%s%n and submitted one: %n%s%n.", process, submittedProcess));
+        process.assertInputValues(submittedProcess);
     }
 
     /**