Basics of vCenter Plugin Automation

What is a vCenter plugin?

vCenter plugins are additional features of the vCenter web client that aid in the management of vendor specific operations (on Storage, Networking and virtualization). These plugins are developed by third party developers to provide a vendor specific user interface in vCenter. For example, a storage vendor can extend the vCenter web client interface to provide additional information about inventory, hosts, virtual machines and statistics about CPU and memory utilization with vCenter Plugin.

What is Automation Framework ?

Automation Framework is the framework that provides an environment to input test data, automate execution of test cases and generation of execution reports. The automation framework must contain the below components:

  • Test Data – Test data can be inputted to the automation framework from external data sources like excel file, properties file, database, xml files etc.
  • Test Execution – Test execution logic written using a testing tool like Selenium that reads test data and execute the test cases.
  • Test Reports – Generation of reports that shows overall statistics of test cases executed.

What are the types of automation framework?

There are different types of automation frameworks, but I will look at only the most used approaches and their requirements:

  1. Data Driven Testing Framework: This framework is used when one has to test the same functionality with different sets of input data. In this framework, the input data is an external database (Excel or XML file) and the test script is written which executes repeatedly for each set of input in the test database.
    For example, testing a login form with different set of username and password combinations
    Pros: Reduces code for test script as all possibilities of inputs are tested with same test script.
    Cons: Knowledge of programming language is a must. Extra efforts required to store and read the data from external database
  2. Keyword Driven Testing Framework: Keyword driven testing is an extension of the data driven testing framework. In this framework, it is imperative to identify the web elements in the application under test and then derive list of keywords i.e actions. Keywords are nothing but methods/functions in the test script which will read the data from external database (example excel file) and perform the necessary action. The test data in file includes keyword, input data, locators and expected data.
    • Keywords – can be like click, sendKeys, OpenBrowser, select, wait etc.
    • Input data – The text needs to inputted to the field else it will be blank.
    • Locators – web element locators such as id, name & xpath.
    • Expected data – used to verify the link or labels in web UI.

    Pros: User only needs the knowledge of keywords and doesn’t need to know how to script.The same keywords can be used multiple times in test cases for different applications.
    Cons: If the number of keyword increases, the framework becomes more complicated.

  3. Hybrid Testing Framework: Hybrid Test Framework is a combination of one or more automation framework like the above. The purpose is to leverage the benefits of different automation frameworks together.

Fig 1.1 Test Framework Structure

What is test automation for VCP?

Test Automation for VCP is a test automation framework for vCenter plugin for ESXi 6.0 and onwards. It is the hybrid framework to cater to the GUI aspect of the vCenter plugin, vCenter REST API and Command Line Interface. Automation for the VCP plugin is done from the Installation phase through to functional testing of GUI, use of Rest API and CLI. In VCP automation, both data driven and keyword driven frameworks are used. Test data is managed in Excel files, such as driver file, test case files and installer script file. The test execution report is generated ina HTML file once the test is completed. These report shows the time the test took, number of test cases, number of total test steps, pass and fail tests, percentage of passing and reason of failure etc.Technology used –  java 1.8, Extent, Selenium, Maven, TestNg, HTML, Jenkins, Install4j and AutoItx4Java.

Provides:

  • GUI testing (HTML, Angular)
  • Installation and UN-installation of plugin
  • VMware rest API automation.
  • Command Line Interface automation
  • Reporting with extent reports
  • Test data in excel format

What are the benefits?

  • Minimal manual intervention
  • Maximum coverage
  • Low cost maintenance
  • Easy Reporting
  • Reduced Time

What are the challenges?

  1. Selecting a Proper Testing Approach: While selecting an automation framework, ask some very basic but important questions to arrive at the right methodology:
    • Will the framework reduce the time and cost for testing?
    • Will the framework useful in future and have a long life?
    • Can we add new actions/keywords with minimum changes?
    • Can the framework generate useful test reports and metrics?
  2. Selecting right technology/tool: Since it is a major challenge to find the right technology for the testing framework, you need to try different tools to come up with the one that suits your requirement. For VCP plugin installer automation, we tried many tools like Sikuli, Winimum and AutoIt but finally decided on AutoIT because it can be easily integrated with Selenium.
  3. Test Case File format: The format of test case file should be optimized so that the end user will have to enter minimum inputs to fill up the test case file.
  4. Automating Rest API : You need to understand the REST API documentation of the vendor and then decide the rest test case file implementation such that it must –
    • Authenticate the rest and getting session. Using same session for the further API calls.
    • Support different request types such as GET, PUT, DELETE & POST
    • Handling of response and validating with expected results
  5. Handling Web Elements: If the User Interface for the plugin is in HTML, it is simple to write the test case actions, but if it is built with Angular JS, you need to handle it differently as selenium does not support Angular elements like grid, graph, & fields.
  6. Generating Test Reports: Default reports are unattractive and information shown is not sufficient for end user. Test Report should show all statistics including – time taken, percentage of pass and failure, reason of failure, platform on which execution is done. To this effect, you use Extent Report which is a third party library which has an integration with Selenium.
  7. How does it help?
    • It validates functional testing as well as installation in an iterative fashion
    • It is integrated with CI and REST to validate functional correctness
    • It will reduces testing time
    • Generate the reports which gives the overall statistics of test Execution
    • It can be later extended to VRO too
  8. How much coverage is possible? Below table shows the coverage:
    User Interface Coverage Percentage
    ESX 6.o 30-40%
    ESX 6.5 and onwards 80-90%

[Tweet “Basics of vCenter Plugin Automation ~ via @CalsoftInc”]

 
Share:

Related Posts

Gen AI Trends 2025

Top Generative AI Trends Shaping 2025

Modernization of industries began with the Industrial Revolution in the early 19th Century with the use of machines, and it has continued with the digitization of devices…

Share:
IoT and its Applications in Driving Smart Manufacturing

IoT and its Applications in Driving Smart Manufacturing

The Internet of Things (IoT) is a key element of global industrial transformation, and the manufacturing sector leads in leveraging this technology. The millions of IoT devices,…

Share:
Product Lifecycle Management in Software Development using Large Language Models

Product Lifecycle Management in Software Development using Large Language Models

The data of any organization is of extreme value. But what happens when that data is not trustworthy and accessible to your teams? You will face challenges…

Share:
Introduction to Automated Tests and Its Types

Introduction to Automated Tests and Its Types

Explore the blog to learn automated tests, its types and how they enhance software quality and efficiency.

Share:

Generative AI and the changing face of Software Development Lifecycle

Explore how Generative AI is transforming the Software Development Lifecycle, boosting efficiency, accuracy, and innovation across all stages.

Share:
A Guide to Security Automation

A Guide to Security Automation

Explore the blog to learn best strategies for security automation to detect, investigate, and remediate cyber threats, enhancing operational efficiency.

Share: