Rename an application

A visual UI test is uniquely identified by the application and test names that you pass to the Eyes SDK   open() method. You can rename both the application name and the test name. This article describes how to rename an application. See Rename a test for a description of how to rename a test.

Once you have renamed an application, Eyes will only use the baselines associated with the applications' tests if the new application name is used. Note that existing test results and baselines will still refer to the original name.

To rename an application takes the steps described below. We use here as an example a case where your application is incorrectly named "Helo World App", you notice the missing "l" and want to change the name to "Hello World App" .

  1. In your test code, change the 2nd parameter of the open() method to "Hello World App".
  2. 
    // Original  
    WebDriver driver = eyes.open(
                            innerDriver, 
                            "Helo World App", 
                            "Hello World Test", 
                            viewportSize);	
    // After rename application name
    WebDriver driver = eyes.open(
                            innerDriver, 
                            "Hello World App", 
                            "Hello World Test", 
                            viewportSize);			
    									
    
    // Original
    eyes.open(
            innerDriver, 
            'Helo World App', 
            'Hello World Test', 
            viewportSize);
    		
    // After rename application name
    eyes.open(
            innerDriver, 
            'HelLo World App', 
            'Hello World Test', 
            viewportSize);
    				
    
    // Original
    var driver = eyes.Open(
                        innerDriver, 
                        "Helo World App", 
                        "Hello World Test", 
                        viewportSize);
    							
    // After rename application name
    var driver = eyes.Open(
                        innerDriver, 
                        "Hello World App", 
                        "Hello World Test", 
                        viewportSize);
    				
    
    // Original
    $this->driver = $eyes->open(
                            $this->innerDriver, 
                            'Helo World App', 
                            'Hello World Test', 
                            $viewportSize);	
    					
    // After rename application name
    $this->driver = $eyes->open(
                            $this->innerDriver, 
                            'Hello World App', 
                            'Hello World Test', 
                            $viewportSize);						
    				
    
    # Original	
    driver = eyes.open(
                    driver=innerDriver, 
                    app_name='Helo World App', 
                    test_name='Hello World Test',
                    viewport_size = viewport_size)	
    		
    # After rename application name
    driver = eyes.open(
                    driver=innerDriver, 
                    app_name='Hello World App', 
                    test_name='Hello World Test',
                    viewport_size = viewport_size)		
    				
    
    # Original
    driver = eyes.open( 
                    driver: inner_driver, 
                    app_name: 'Helo World App', 
                    test_name: 'Hello World Test',
                    viewport_size: viewport_size)
    		
    # After rename application name
    driver = eyes.open(driver: inner_driver, 
                    app_name: 'Hello World App',
                    test_name: 'Hello World Test',
                    viewport_size: viewport_size)
    				
  3. Navigate to the Apps and test page using the page navigator and find the application "Helo World app" in the list of applications in the left panel. If the list is long, just type some text in the filter apps control, and the system will only display applications whose name contain the text you typed. (See Filter the list of applications for more details).
  4. Hover over the application entry until the menu appears and then select the Rename option.
  5. A dialog box will open, type in the new name, or change the current name. Click the Rename button to make the change permanent, or click the Cancel button to abort the rename process.

If the new name you provide was previously used as an application name, even if that application was deleted, the system will give you an error message and will not allow you to complete the rename operation.

After renaming an application, you must use the new name in all your tests as shown in the first step. Using the old name would create a new application, and therefore the test would be considered "new".