Learn 15+ CodedUI Interview Questions & Answers [ SURE SHOT ]
Coded UI Interview Questions and Answers

Learn 15+ CodedUI Interview Questions & Answers [ SURE SHOT ]

Last updated on 04th Jul 2020, Blog, Interview Questions

About author

Roshankumar (Sr QA Architect )

(5.0) | 16547 Ratings 1564

These Coded UI Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Coded UI. As per my experience good interviewers hardly plan to ask any particular question during your interview, normally questions start with some basic concept of the subject and later they continue based on further discussion and what you answer.we are going to cover top 100 Coded UI Interview questions along with their detailed answers. We will be covering Coded UI scenario based interview questions, Coded UI interview questions for freshers as well as Coded UI interview questions and answers for experienced. 

1.What is Automation Testing?

Ans:

Automation Testing is a process where tester writes the scripts using automation tool and execute the scripts to test the product/Software/application by comparing the actual results with expected results.

2.Why going for Coded UI Automation Testing?

Ans:

  •  For Coded UI we can use Visual Studio IDE to write scripts.
  • Coded UI scripts can be executed using Visual Studio or by using Microsoft Test Manager (MTM).
  • For Coded UI we can write the script with Visual Studio with which we can use all object programming concepts if required.
  •  Coded UI supports windows applications, web applications, WPF applications, Sharepoint applications, Client applications and CRM web client applications.
  •  Coded UI offers support to any information source managed by .NET framework. Coded UI supports file formats of .csv, .xml or information sources like SQL server table, access table etc.

3.How much % of testing will be covered for Automation testing?

Ans:

In automation testing, mostly the below conditioned test cases can only be automated:

  •  Critical Scenarios test cases.
  • Repeated test cases.
  • Time consuming test cases.
  • Test cases which are difficult to perform manual test cases.

Considering the above situations 60-70 % of testing can be covered for automation testing. Also height, width and colours of controls in application/software/product can’t be tested.

4.How many types of programming approaches available in coded UI?

Ans:

3 Types of programming available in Coded UI.

  • Complete Descriptive Programming.
  • Programming using UI Map.
  • Recording and Playback

5.How controls will be recognized in Coded UI?

Ans:

There is a tool accessible in Coded UI named Test Builder. In this Test Builder there is an option named ‘Cross Hair’, using this cross hair we can recognize the controls and can view the property information of controls.

6.Explain about Test Builder?

Ans:

Test Builder is a tool accessible in Coded UI which contains four options

  • Record: is used to record the actions.
  • Show Recorded Steps: used to show all the recorded steps.
  • Cross Hair: is used to recognize the controls and can view the property information of controls.
  • Generate Code: used to generate the code for the recorded actions.

7.What is the namespace to work on Coded UI controls?

Ans:

  • Below the namespace to work on Coded UI
  • using Microsoft.VisualStudio.TestTools.UITesting;
  • using Microsoft.VisualStudio.TestTools.UnitTesting;
  • using Microsoft.VisualStudio.TestTools.UITest.Extension;

8.What is the namespace to work on Web Controls?

Ans:

Below the namespace to work on Web Controls in Coded UI using Microsoft.VisualStudio.TestTools.UITesting.HtmlControls;

9.What is Test Method in Coded UI?

Ans:

In Coded UI, 1 TestMethod is same as 1 Test case.

10.What are Test Initialize and Test Cleanup Coded UI?

Ans:

  • Test Initialize attribute is same as TestMethod which executes before a TestMethod by default. Browser launch, login functionality will be scripted in Test Initialize.
  • Test Clean Up attribute is same as TestMethod which executes after a TestMethod by default. Closing the browser, clearing cache, clearing cookies and log out functionality will be scripted in Test Clean Up.

11.What is Attribute Coded UI? And give some list of attributes?

Ans:

  • [TestMethod] is an attribute before method in class and indicates the method should be executed to perform a test.
  • [DataSource(…)] is an attribute which is used for Data Driven Testing.

Like wise there are many attributes available in Coded UI:

  • [TestMethod]
  • [TestCleanup]
  • [TestInitialize]
  • [TestClass]
  • [AssemblyCleanup]

12.What is approach to perform mouse click operation?

Ans:

using Click() method we can perform click operation on any control in Coded UI.

Total there are 10 Click() overload methods mentioned below:

  • Mouse.Click();
  • Mouse.Click(ModifierKeys modifierKeys);
  • Mouse.Click(MouseButtons button);
  • Mouse.Click(Point screenCoordinate);
  • Mouse.Click(UITestControl control);
  • Mouse.Click(UITestControl control, ModifierKeys modifierKeys);
  • Mouse.Click(UITestControl control, MouseButtons button);
  • Mouse.Click(UITestControl control, Point relativeCoordinate);
  • Mouse.Click(MouseButtons button, ModifierKeys modifierKeys, Point screenCoordinate);
  • Mouse.Click(UITestControl control, MouseButtons button, ModifierKeys modifierKeys, Point relativeCoordinate);

13.What is alternative approach to perform click operation(without Mouse.Click())?

Ans:

Move the control on to ui element using Keyboard.SendKeys(“{TAB}”); then use Keyboard.SendKeys(“{ENTER}”); to perform click operation.

14.What are Search Properties and Filter Properties?

Ans:

  • Search Properties are Mandatory (Primary) Properties which perform AND operation
  • Filter Properties are Secondary properties which perform OR operation.

15.What is Search Configuration?

Ans:

Search Configuration in Coded UI:

  • In Coded UI there are some predefined search configuration to perform actions on controls.

Below are the 5 search configurations.

  •  Always Search: UI Test uses cache to perform actions on controls in an application, Always Search force UI test to search the control in the application and not in cache.

Example:

  • HtmlImage control = new HtmlImage();
  • control.SearchProperties.Add(HtmlImage.PropertyNames.TagName, “TagName”);
  • control.SearchProperties.Add(HtmlImage.PropertyNames.Id, “Id”);
  • control.SearchProperties.Add(SearchConfiguration.AlwaysSearch);
  • Disambiguate Search: If parent and child has same properties and there is a chance where UI test perform the action on parent itself, Disambiguate search force UI test to perform the action for child control instead of parent control.

Example:

  • HtmlImage control = new HtmlImage();
  • control.SearchProperties.Add(HtmlImage.PropertyNames.TagName, “TagName”);
  • control.SearchProperties.Add(HtmlImage.PropertyNames.Id, “Id”);
  • control.SearchProperties.Add(SearchConfiguration.DisambiguateChild);
  • Next Sibling: UI test Searches the next sibling in the container and performs the action.

Example:

  • HtmlImage control = new HtmlImage();
  • control.SearchProperties.Add(HtmlImage.PropertyNames.TagName, “TagName”);
  • control.SearchProperties.Add(HtmlImage.PropertyNames.Id, “Id”);
  • control.SearchProperties.Add(SearchConfiguration.NextSibling);
  • Expand While Search: UI test expands the control before searching the control inside. ex., Tree View

Example:

  • HtmlImage control = new HtmlImage();
  • control.SearchProperties.Add(HtmlImage.PropertyNames.TagName, “TagName”);
  • control.SearchProperties.Add(HtmlImage.PropertyNames.Id, “Id”);
  • control.SearchProperties.Add(SearchConfiguration.ExpandWhileSearching);
  • Visible Only Search: UI test Performs action only if the control is visible.

Example:

  • HtmlImage control = new HtmlImage();
  • control.SearchProperties.Add(HtmlImage.PropertyNames.TagName, “TagName”);
  • control.SearchProperties.Add(HtmlImage.PropertyNames.Id, “Id”);
  • control.SearchProperties.Add(SearchConfiguration.VisibleOnly);

16.How many UI maps can be created in Coded UI?

Ans:

Any number of UIMaps can be created in Coded UI.

17.How to access the new UI Map controls from another cs file?

Ans:

Using Get and Set properties we can access the new UI Map controls in another cs files. Below the sample code.

  • public UIMap UIMap
  • {
  • get
  • {
  • if ((this.map == null))
  • {
  • this.map = new UIMap();
  • }
  • return this.map;
  • }
  • }
  • private UIMap map;

18.How many types of DDT available on Coded UI?

Ans:

Data Driven Testing can be done in Coded UI using 5 Data Source types

  • Using CSV
  • using XML
  • using Excel
  • using SQL
  • using Test case in TFS

19.What are the 4 major steps in DDT?

Ans:

Below are the 4 major steps for DDT in Coded UI

  • Prepare the test data.If working on CSV/XML/EXCEL, create respective file and add the test data.
  • If working on SQL/TFS directly add the test data to respective table/test case.
  • Add the Data Source Attribute.
  • Get the test data from file and map to respective control. Right click on file, go to properties and change the Copy to Output Directory value to ‘Copy always’.

20.Assertion and Uses?

Ans:

  • Assertions is same as validations which helps to verify if the actual output is same as expected output.
  • “An assertion is a predicate (a true–false statement) placed in a program to indicate that the developer thinks that the predicate is always true at that place. If an assertion evaluates to false at run-time, an assertion failure results, which typically causes execution to abort.”

Below are some important classes used in:

  • Coded UI
  •  Assert
  • StringAssert
  • AssertFailedException
  • AssertInconclusiveException

Some of the most commonly used assertion method like:

  •  AreEqual
  • AreNotEqual
  • Contains
  • AreSame etc..

    Subscribe For Free Demo

    21.Why we are going assertions instead of If-Else?

    Ans:

    When IF-Else is used and if test case fails still Coded UI passes the TestMethod, to overcome this issue Coded UI introduced Assertions.

    22.How many Assertions can be there in a Test Method?

    Ans:

    There can be any number on Assertions.

    There are 3 Assertions Assert1, Assert2 and Assert3 and if Assert1 fails.

    23.a.Will Assert2 and Assert3 will get execute?

    b.What to do to execute Assert2 and Assert3?

    Ans:

    a. Assert2 and Assert3 won’t executes

    b. To execute Assert2 and Assert3 use try-catch

    24.Difference between Assert.IsEqual() and Assert.AreSame().

    Ans:

    Assert.IsEqual() refers to control value.

    Assert.AreSame() refers to reference of the control.

    25.What is Synchronization?

    Ans:

    Making sure that the speed of automation scripts execution should be in sync with application under test (AUT) response/speed.

    26.Levels of Synchronization?

    Ans:

    Two levels of Synchronization:

    • Test level Synchronization.
    •  Statement level Synchronization

    27.What are Conditional Statements in Synchronization?

    Ans:

    Statements executes depending on some conditon. In coded UI there are 8 Conditional Statements

    • WaitForControlReady()
    • WaitForControlEnabled()
    • WaitForControlExist()
    • WaitForControlNotExist()
    • WaitForControlPropertyEqual()
    • WaitForControlPropertyNotEqual()
    • WaitForControlCondition()
    • WaitForCondition()

    28.What is Coded UI Test (CUIT)?

    Ans:

    CUIT are automated tests that drive your application through its user interface (UI). Hence, the name coded UI tests (CUITs). These tests involve functional testing of the UI controls. It checks the functionality of the whole application including the user interface.

    29.Comparison of coded UI test Vs. Selenium vs. QTP

    Ans:

    Below is the comparison table of coded UI test with other automation tools:

    • Selenium does not support any WPF as well as Windows applications
    • Visual Studio Coded UI supports the Window store application testing as well as Window Phone application testing. No other tools support this.
    • Test complete does support Window Application but requires a plugin to be installed.

    30. What is Automation?

    Ans:

    Automation is any action that can reduce human efforts.

    Course Curriculum

    Get Hands-On Learning Coded UI Certification Course By Certified Expert

    Weekday / Weekend BatchesSee Batch Details

    31.What all things can you automate?

    Ans:

    • Regression test suite
    • Smoke / Sanity test suite
    • Build deployment
    • Test data creation
    • Automating behind the GUI like testing of APIs and methods.

    32.When is Automation testing useful?

    Ans:

     Automation testing is useful in the following scenarios:

    • Regression testing: In case of a bug fix or new module implementation, we have to make sure that the already implemented or unchanged functionality is not affected. In this case, we end up running the regression test case multiple times.

    For Example: After each change request or bug fix, after each iteration in case of incremental development approach, etc.

    • Non-functional Testing: Testing the non-functional aspects of an application.

    For Example, Load testing or performance testing, etc are very difficult for humans to track and analyze.

    • Complex calculation checks or test scenarios that are prone to human errors.
    • Repeated execution of the same tests: Sometimes, we have to run the same set of test case for a different set of data or after each build release or on multiple hardware, software or combination of both.

    Automating the test cases in the above scenarios helps in achieving the speed of testing and minimizing human errors.

    33. How do you identify the test cases which are suitable for automation?

    Ans:

     Identifying the appropriate test cases for automation is the most important step towards automation.

    34.Can you achieve 100% automation?

    Ans:

     100% automation would be difficult to achieve because there would be many edge test cases and some cases that are executed seldom. Automating these cases which are not executed that often will not add value to the automated suite.

    35.How to decide the tool that one should use for Automation testing in their projects?

    Ans:

     In order to identify the tool for Automation testing in your project:

    • Understand your project requirements thoroughly and identify the testing scenarios that you want to automate.
    • Search for the list of tools that support your project’s requirements.
    •  Identify your budget for the automation tool. Select the tools within your budget.
    • Identify if you already have skilled resources for the tools. If you don’t have the necessary skilled resources then identify the cost for training the existing resources or hiring new resources.
    • Now compare each tool for key criteria like:

    36.Currently I do not have any automation in place in my project, but now I want to implement automation, what would be my steps?

    Ans:

    • First, identify which type of testing/test cases you want to automate.
    • Identify the tool
    • Design the framework
    • Create utility files and environment files.
    • Start scripting
    • Identify and work on reporting.
    • Allocating time for enhancing and maintaining the scripts.

    Steps required for getting Automation Testing in place for a project include:

    • Understand the advantages and disadvantages of automation testing and identify the test scenarios which are suitable for automation.
    • Select the automation tool that is best suited for automating the identified scenarios
    • Find the tool expert to help in setting up the tool and required environment for executing the test cases using the tool.
    • Train the team so that they can write scripts in the programming language that the tool supports.
    • Create the test framework or identify the already existing one that meets your requirements.
    • Write an execution plan for OS, browsers, mobile devices, etc.
    • Write programming scripts for manual test cases to convert them into automated test cases.
    • Report the test case status by using the reporting feature of the tool.
    • Maintain the scripts for ongoing changes or new features.

    37.How do you decide which tool you have to use?

    Ans:

     Concluding which tool is best suitable for the project requires a lot of brainstorming and discussions.

    38. Once you identify the tool what would be your next steps?

    Ans:

    Once we finalize the tool, our next step would be to design the framework.

    39.What is a framework?

    Ans:

     A framework is a set of the structure of the entire automation suite. It is also a guideline, which if followed can result in a structure that is easy to maintain and enhance.

    The guidelines include:

    • Coding standards
    • Handling the test data
    • Maintaining and handling the elements (object repository in QTP)
    • Handling of environment files and properties file
    • Reporting of data
    • Handling logs

    40.What are the attributes of a good framework?

    Ans:

    The characteristics include:

    • Modular: The framework should be adaptable to change. Testers should be able to modify the scripts as per the environment or login information change.
    • Reusable: The commonly used methods or utilities should be written in a common file that is accessible to all the scripts.
    • Consistent: The suite should be written in a consistent format by following all the accepted coding practices.
    • Independent: The scripts should be written in such a way that they are independent of each other. In case one test fails, it should not hold back the remaining test cases (unless it is a login page)
    • Logger: It is good to have implemented the logging feature in the framework. This would help in case our scripts run for longer hours (say nightly mode), if the script fails at any point of time, having the log file will help us to detect the location along with the type of the error.
    • Reporting: It is good to have the reporting feature automatically embedded into the framework. Once the scripting is done, we can have the results and reports sent via email.
    • Integration: Automation Framework should be such that it is easy to integrate with other applications like continuous integration or triggering the automated script as soon as the build is deployed.

    41.Can you do without a framework?

    Ans:

    Frameworks are guidelines and not mandatory rules, so we can do without a framework, but if we create it and follow it, enhancing and maintaining would be easy to implement.

    42.What are the different types of the Automation tool that you are aware of?

    Ans:

    • Open source tool like Selenium, JMeter, etc.
    • Paid tools like QTP, Load Runner, Ranorex, RFT, and Rational Robot.

    43.What generally is the structure of a framework?

    Ans:

     Normally the structure should have – (It would differ from project to project)

    • A “src” (source) folder having the actual test scripts.
    • A”lib” (library) folder having all the libraries and common methods.
    • A “class” folder having all the class file (in-case using java).
    • A “log” folder having the log file(s).
    • A file/folder having all the web element Ids.
    • A file containing the URL, environment and login information.

    44.Where will you maintain information like URL, login, password?

    Ans:

    This information should always be maintained in a separate file.

    45.Why do you want to keep this kind of information in a separate file and not directly in the code?

    Ans:

    •  URL, Login, and passwords are the kind of fields that are used very often and these change as per the environment and authorization. In case we hardcode it into our code, we have to change it in every file which has its reference.
    • In case if there are more than 100 files, then it becomes very difficult to change all the 100 files and this, in turn, can lead to errors. So this kind of information is maintained in a separate file so that updating becomes easy.

    46.What are the different types of frameworks?

    Ans:

    Different types of frameworks includes:

    • Keyword-driven framework
    • Data-Driven framework
    • Hybrid Framework
    • Linear Scripting

    47.Can you tell some good coding practices while automation?

    Ans:

    Some of the good coding practices include:

    • Add appropriate comments.
    • Identify the reusable methods and write it in a separate file.
    • Follow the language-specific coding conventions.
    • Maintain the test data in a separate file.
    • Run your scripts regularly.

    48.Any kind of test which you think should not be automated?

    Ans:

    • Tests that are seldom executed.
    • Exploratory testing
    • Usability testing
    • Test which is executed quickly when done manually.

    49. Do you think that testing can be done only at the UI level?

    Ans:

    • Today as we are moving to the Agile mode, testing is not limited to the UI layer. Early feedback is imperial for an agile project. If we concentrate only on the UI layer, we are actually waiting until the UI is developed and available to test.
    • Rather we can test even before the UI is actually developed. We can directly test the APIs or the methods using tools like Cucumber and FitNesse.
    • In this way, we are giving the feedback much early and are testing even before the UI is developed. Following this approach will help us to test only the GUI aspect of small cosmetic changes or some validations on the UI and will help the developers by giving more time to fix the bugs.

    50. How do you select which automation tool is best suited for you?

    Ans:

    Selecting the automation tool depends upon various factors like:

    • The scope of the application which we want to automate.
    • Management overhead like cost and budget.
    • Time to learn and implement the tool.
    • Type of support available for the tool.
    • Limitation of the tool.
    Course Curriculum

    Learn Coded UI Training with In-Depth Concepts From Industry Trainers

    • Instructor-led Sessions
    • Real-life Case Studies
    • Assignments
    Explore Curriculum

    51.What is Coded UI Test (CUIT)?

    Ans:

    CUIT are automated tests that drive your application through its user interface (UI). Hence, the name coded UI tests (CUITs). These tests involve functional testing of the UI controls. It checks the functionality of the whole application including the user interface.

    52.Why to use coded UI for test automation?

    Ans:

    The reasons are:

    • Developers and Software Testers can collaborate effectively using the same tools/language.
    • It supports both webs as well as Windows projects.
    • The element identification mechanism is a great feature in Coded UI. Also, it supports synchronization
    • The Playback Engine supports features such as ‘WaitForControlExist’ , ‘WaitForReadyLevel’, etc
    • With the help of ‘Tests Agents,’ automation tests can be run on remote machines
    • Automation teams can develop sophisticated tests, using coded UI with a layered framework
    • Software testers can capture exceptions and record the result effectively utilizing log4net.dll
    • Coded UI tool supports descriptive programming. It allows software testers to automate scenarios based on object properties
    • It supports AJAX controls.

    53.How to create coded UI tests(CUIT)?

    Ans:

    To create coded UI tests you can do it in following ways:

    • Generating from an Existing Action Recording ( converting from manual test recording)
    • Creating a new coded UI test from scratch
    • Writing code from scratch

    54.what are the Contents of a Coded UI Test?

    Ans:

    When you create a coded UI test, the coded UI test builder creates a Map. This includes UI under test, test methods, parameters, assertions, etc. For each test, it also creates a class file.

    • UIMap.cs: Any modification or customization done to the UIMap is stored in this file. Initially, this file will be blank and can be populated later on. If modifications are directly madeto the UIMap.designer.cs file, make sure it is not recorded otherwise all changes will be lost.
    • CodedUITest1.cs: This file contains coded UI test class, test methods, assertion invocation and method invocation. All assertion and methods are by default invoked from this file.
    • UIMap.uitest: It is an XML representation of the UIMap class. It includes windows, controls, properties, methods, actions and assertions. It is edited only through UI Map editor

    55.How to perform coded UI test?

    Ans:

    Coded UI has two different ways to conduct a test for your application.

    • Coded UI Record and Playback or
    • Coded UI Hand coding
    • You have to follow the following step to perform coded UI test,
    • Create a coded UI test project
    • Add a coded UI test file
    • Record a sequence of actions
    • Verify the values in UI fields such as text boxes.
    • View the generated test code
    • Add more actions and assertions
    • Edit the details of the test activities and the assertions.
    • Run the test

    56. Explain some Automation testing tools.

    Ans:

     Some of the famous Automation testing tools are explained below:

    (i) Selenium: Selenium is a test framework for web application automation testing. It supports multiple browsers and is OS independent. Selenium also supports various programming languages like Java, C#, PHP, Ruby, and Perl, etc.

    Selenium is an open-source set of libraries which can be used to develop additional test frameworks or test scripts for testing web-based applications.

    (ii) UFT: Unified Functional Testing is a licensed tool for functional testing. It provides a wide range of features like APIs, web services, etc and also supports multiple platforms like desktops, web, and mobile. UFT scripts are written in visual basic scripting language.

    (iii) Appium: Appium is an open-source mobile application testing tool. It is used to automate testing on cross-platform, native, hybrid and web-based mobile applications. Appium automates any mobile application from any language with full access to APIs and DBs from the test code.

    Appium is based on the client-server architecture and has evolved from selenium.

    (iv) Cucumber: Cucumber is an open-source behavior-driven development tool. It is used for web-based application automation testing and supports languages like ruby, java, scala, groovy, etc. Cucumber reads executable specification written in plain text and tests the application under test for those specifications.

    For cucumber to understand the scenarios in plain text, we have to follow some basic syntax rules which are known as Gherkin.

    (v) TestComplete: TestComplete is a licensed automated UI testing tool to test the application across different platforms like desktops, web, mobile, etc. It provides flexibility to record a test case on one browser and run it on multiple browsers and thus supports cross browsers testing.

    TestComplete has inbuilt object recognition algorithm which uniquely identifies an object and stores it in the repository.

    57. What are the different types of testing framework techniques?

    Ans:

    There are four types of automation testing framework techniques.

    They are:

    (i) Modular Testing framework:

    This framework is built on the concept of abstraction. In this framework, the tester creates scripts for each module of the application under test individually and then these scripts are combined in the hierarchical order to create large test cases.

    It creates an abstraction layer between the modules, thus any modifications in test scripts for one module do not affect any other modules.

    (ii) Data-Driven Testing framework:

    In the Data-driven testing framework, the input data and the expected output data corresponding to the input data is stored in a file or database and the automated script runs the same set of test steps for multiple sets of data. With this framework, we can run multiple test cases where only the input data differs and the steps of execution are the same.

    (iii) Keyword-Driven Testing framework:

    It is an application-independent testing framework that uses data tables and self-explanatory keywords. Keywords explain the actions to be performed on the application under test and the data table provides the input and expected output data.

    Keyword-based testing is an increment to data-driven testing.

    (iv) Hybrid Testing framework:

    This framework is a combination of all the above-mentioned testing frameworks ( Modular, Data-driven, and Keyword-driven).

    In this framework, the test cases are developed from modular scripts by combining them in the modular testing framework. Each of the test cases uses a driver script that uses a data file as in the data-driven framework and a keyword-based action file.

    58. What is TestComplete Automation testing tool.

    Ans:

     TestComplete is a licensed automated UI testing tool to test the application across different platforms like desktops, web, mobile, etc. It provides flexibility to record a test case on one browser and run it on multiple browsers and thus supports cross browsers testing.TestComplete has inbuilt object recognition algorithm which uniquely identifies an object and stores it in the repository.

    59.What are the Advantages and disadvantages of  Modular Testing framework?

    Ans:

    Advantages of this framework:

    • Easier maintenance and scalability of test cases.
    • Creating test cases by using already scripted modules is easier and faster.

    Disadvantages:

    • Test cases have data embedded in them. Thus executing the same test script with different data is a big change at the script level.

    60.What are the Advantages and Disadvantages of Data-Driven Testing framework ?

    Ans:

    Advantages:

    • Reduces the number of test scripts that are required to be executed. We execute the same script multiple times with different data.
    • Less coding for automation testing.
    • Greater flexibility for maintaining and fixing the bugs or enhancing the functionality.
    • Test data can be created even before the automated system for testing is ready.

    Disadvantages:

    • Only similar test cases with the same set of execution steps can be combined for multiple sets of data. The different set of execution steps require a different test case.

    61.  What are the Advantages and Disadvantages of Keyword-Driven Testing framework?

    Ans:

    Advantages:

    • Less coding and the same script can be used for multiple sets of data.
    • Automation expertise is not required for creating a test case using the already existing keywords for actions.
    • Same keywords can be used across multiple test cases.

    Disadvantages:

    • This framework is more complicated as it needs to take care of the keyword actions and also the data input.
    • Test cases get longer and complex thereby affecting the maintainability of the same.

    62. What are the Advantages and Disadvantages of Hybrid Testing framework?

    Ans:

    Advantages:

    • Modular and easy to maintain.
    • Less coding can take care of more test cases.
    • One test case can be executed with multiple sets of data.

    Disadvantages:

    • Complex to read, maintain and enhance.

    63. When do you prefer Manual testing over Automation testing?

    Ans:

    We prefer manual testing over automation testing in the following cases:

    • The project is short-term and writing scripts will be time-consuming and costly when compared to manual testing.
    • Flexibility is required. Automated test cases are programmed and run in a specific way of configurations.
    • Usability testing needs to be performed.
    • Applications/module is newly developed and has no previous test cases.
    • Ad-hoc or exploratory testing needs to be performed.

    64.Is Automation testing in agile Methodology useful or not?

    Ans:

    • Automation testing is useful for regression, smoke or sanity testing. All these types of testing in the traditional waterfall model happen at the end of the cycle and sometimes if there are not many enhancements to the application, we might not even have to do regression testing.
    • Whereas, in agile methodology, every iteration requires executing the regression test case as some new functionalities is added.
    • Also, the regression suite itself keeps growing after each sprint as the functional test cases of the current sprint module need to be added to the regression suite for the next sprint.
    • Thus, Automation testing in agile methodology is very useful and helps in achieving maximum test coverage in less time of the sprint.

    65. List some advantages and disadvantages of Automation testing.

    Ans:

    Advantages:

    • Fewer human resources
    • Reusability
    • More Test Coverage in less time
    • Reliability
    • Parallel execution of test cases
    • Fast

    Disadvantages:

    • Development and maintenance time is more.
    • Tool Cost
    • Skilled resources are required.
    • Environment setup
    • Test Script debugging is an issue.

    66.List some advantages and disadvantages of Manual testing.

    Ans:

    Advantages:

    • No environment setup needed.
    • Programming knowledge is not required.
    • Recommended for dynamically changing requirements.
    • Allow human observation power to detect more bugs.
    • The cost is less for short-term projects.
    • Flexibility

    Disadvantages:

    • Difficult to perform complex calculations.
    • Reusability
    • Time taking
    • High risk of human errors or mistakes.
    • More human resources are required.

    67.Can we do Automation testing without a framework? If yes, then why do we need a framework?

    Ans:

    •  Yes, We can perform automation testing even without using a framework. We can just understand the tool that we are using for automation and program the steps in the programming language that tools support.
    • If we automate test cases without a framework then there won’t be any consistency in the programming scripts for test cases.
    • A framework is required to give a set of guidelines that everyone has to follow to have maintained readability, reusability, and consistency in the test scripts. A framework also provides one common ground for reporting and logging functionality.

    68.How will you automate basic “login” functionality test cases for an application?

    Ans:

    Assuming that the automation tool and framework is already in place of the test environment.

    To test the basic “Login” functionality:

    • Understand the project requirement: Login functionality will have a username textbox, a password textbox, and a login button.
    • Identify the Test scenarios: For login functionality, the possible test scenarios are:
      • Blank username and password
      • Invalid username and password
      • A valid username and invalid password
      • Valid username and password
      • Prepare a Data input file with the data corresponding to each scenario.
      • Launch the tool from the program.
    • Identify the username field, password field, and the login button.
    • For each test scenario, get the data from the data file and enter into the corresponding fields. Program click on the login button after entering the data.
    • Validate the error message for negative scenarios and the success message for positive scenarios in the test script with the help of assertions.
    • Run the test suite and generate the report.

    69.Is Automation testing a Black box testing or White-box testing?

    Ans:

    • Automation testing is mostly a black box testing as we just program the steps that a manual tester performs for application under test without knowing the low-level design or code of the application.
    • Sometimes, automated test scripts need access to the database details that are used in the application under test or some more coding details and thus can be a type of white-box testing.
    • Thus automated testing can be both black or white box type of testing depending on the scenarios in which automation is performed.

    70. How many test cases have you automated per day?

    Ans:

    • Well, the number depends on the complexity of the test cases. When the complexity was limited, I was able to automate 5 to 6 test cases per day. Sometimes, I was able to automate only one test case for complex scenarios.
    • I have also broken down my test cases into different components like, take input, do the calculation, verify the output etc. in case of very complex scenarios and have taken 2 or more days.
    Coded UI Sample Resumes! Download & Edit, Get Noticed by Top Employers! Download

    71.What factors determine the effectiveness of Automation testing?

    Ans:

    Some of the factors that determine the effectiveness of automation testing are:

    • Time saved by running scripts over the manual execution of test cases.
    • Defects found
    • Test Coverage or code coverage
    • Maintenance time or development time
    • Stability of the scripts
    • Test Reusability
    • Quality of the software under test

    72. Which test cases can be automated?

    Ans:

     Types of test cases which can be automated are:

    •  Smoke test cases: Smoke testing is also known as build verification testing. Smoke test cases are run every time when a new build is released to check the health of the build for acceptance to perform testing.
    • Regression Test Cases: Regression testing is the testing to ensure that previously developed modules are functioning as expected after a new module is added or a bug is fixed.Regression test cases are very crucial in incremental software approach where a new functionality is added at each increment phase. In this case, regression testing is performed at each incremental phase.
    • Complex Calculation test cases: Test cases which involve some complex calculations to verify a field for an application fall into this category. Complex calculation results are more prone to human errors hence when automated they give accurate results.
    • Data-driven test cases: Test cases which have the same set of steps and run multiple times with the change of data are known as data-driven test cases. Automated testing for these kinds of test cases is quick and cost-effective.
    • Non-functional test cases: Test cases like load tests and performance tests require a simulated environment with multiple users and multiple hardware or software combinations.Setting up multiple environments manually is impossible for each combination or number of users. Automated tools can easily create this environment to perform non-functional testing easily.

    73.What are the phases in Automation testing Life Cycle?

    Ans:

    The phases in Automation testing life Cycle include:

    • The decision to perform automation testing.
    • Identify and learn about the automation tool.
    • Determine the scope of automation testing.
    • Design and develop a test suite.
    • Test Execution
    • Maintenance of test scripts.

    74. What is an Automated test script?

    Ans:

    •  An automated test script is a short program that is written in a programming language to perform a set of instructions on an application under test to verify if the application is as per the requirements.
    • This program when run, gives the test results as pass or fail to depend on if the application is as per the expectations.

    75.How the Password Encryption done in Coded UI?

    Ans:

    We cannot pass the password directly to the field for that we need to encrypt the password. In CODEDUI we can use Playback.EncryptText(“String value”);, which gives you an output of encrypted string values as a password.

    76.What are the class names to launch a browser in web application and launch an application in desktop application?

    Ans:

    • To launch browser, BrowserWindow class and Launch() method is used.

    Sample Code:

    • BrowserWindow.CurrentBrowser = “ie”;
    • BrowserWindow google = BrowserWindow.Launch(“www.google.com”);
    • To launch application, ApplicationUnderTest class and Launch() method is used.

    Sample Code:

    • ApplicationUnderTest calculator = ApplicationUnderTest.Launch(“.exe path of calculator”);

    77.Different Automation Testing Tools in IT Industry?

    Ans:

    Nowadays, everyone prefers various Automation Tools like QTP, CodedUI, Selenium etc. Using these tools, we can get very accurate results compared to that of manual processes. Selenium is open source whereas CodedUI and QTP both are licensed tools. Selenium is easy and fast in execution compared to QTP and CodedUI.

    78 How is of Automation Testing used?

    Ans:

    Using Selenium or any other Automation Tool, we can perform various tasks, like execution of test cases with accurate results, and navigating through various scenarios and screens multiple times. Executing the test cases on remote machines by launching various browsers remotely reduces the time and effort.

    79.What is Selenium and its components?

    Ans:

    Selenium is an open source automation tool which is used to execute the test cases on web applications. Selenium supports various programming languages which include C#.Net , Java , Perl , PHP, Javascript etc. It supports various platforms to perform execution; some of the platforms are Windows , Linux , Mac OS, windows -10(For Edge browser) etc. It supports various browsers to execute the test cases such as Chrome browser , Internet Explorer, Firefox , Safari ,Edge etc.

    The various components of Selenium are

    • Selenium Core
    • Selenium RC
    • Selenium IDE
    • Selenium Grid
    • Selenium webdriver.

    80.Why should I prefer Selenium over other Automation tools ?

    Ans:

    Selenium is an open source Automation tool ,whereas CodedUI,QTP or other tools are Licensed Versions. Selenium is very fast in execution compared to other tools. It supports execution on web applications as well as mobile applications like Android, IOS, etc.

    81.What are the advantages of using Selenium ?

    Ans:

    Using Selenium we can perform parallel execution with the help of hub and node configuration and it also supports execution of the test cases in remote machines which saves time and human effort.

    82.What is a webdriver ?

    Ans:

    Selenium webdriver is an object oriented tool which consists of various classes and namespaces with which we can perform various actions on the web elements or controls.

    83.What is the difference between Quit() and Close() ?

    Ans:

    Both are the methods of a IwebDriver interface.

    • driver.close() is used when we want to close the particular windows or current window in which we perform the execution of test cases.
    • driver.quit() is used when we want to close all the browser windows which were launched or opened by the current webdriver.

     84.Which programmings are supported in Selenium?

    Ans:

    JAVA, C#, PHP, Perl, JavaScript etc.

    85.What are the platforms supported in Selenium ?

    Ans:

    Windows(including Windows-10 for Edge browser), Linux , MacOS etc.

    86.What is Assertion and different types of Assertions are used in Selenium ?

    Ans:

    Assertion is used to verify or to check whether the given value is present on the webpage or not .

     various type of Assertions like:

    • Assert Text
    • Assert text is used to Assert the value Available in the textbox.
    • AssertElementPresent
    • Assert Elementpresent is used to verify whether element is displayed on the webpage or hidden state.
    • AssertBodyText
    • It is used to verify whether the given input exists on the webpage.
    • AssertId
    • It is used to verify / Assert the id of an element.
    • Assert Title
    • 88.It is used to verify the title of the webpage.

    87.What is a hub and node ?

    Ans:

     Hub acts as a Server or middle point. We can configure multiple nodes to a hub. Hub distributes the test cases we want to execute on various nodes.

    88.What is jar file and how do we configure hub and node?

    Ans:

    Jar file is a Java Execute file which is used for creating the hub .

    The following is the process for configuring hub and Node.

    • Before configuring hub, we need to have Java runtime installed in our machine. Without Java runtime, we cannot configure the hub.
    • Once Java runtime is installed into your machine, you can download the Jar file from the official website.
    • Java -jar “Name of the jar file” – role hub , this command will configure hub.
    • Java – jar “name of the jar file” -role hub – node http://192.168.1.1:4444 -bowser:browsername=”chrome” Version=ANY -DwebDriver.chrome.driver=”path of the chrome driver”

    The above command will configure the node.

    89.List the Advantages of Automation testing.

    Ans:

    • Fewer human resources
    • Reusability
    • More Test Coverage in less time
    • Reliability
    • Parallel execution of test cases
    • Fast

    90. List the Disadvantages of Automation testing.

    Ans:

    • Development and maintenance time is more.
    • Tool Cost
    • Skilled resources are required.
    • Environment setup
    • Test Script debugging is an issue.

    91. Explain selenium Automation testing tool.

    Ans:

     Selenium: Selenium is a test framework for web application automation testing. It supports multiple browsers and is OS independent. Selenium also supports various programming languages like Java, C#, PHP, Ruby, and Perl, etc.Selenium is an open-source set of libraries which can be used to develop additional test frameworks or test scripts for testing web-based applications.

    92. Explain UFT Automation testing tool.

    Ans:

    Unified Functional Testing is a licensed tool for functional testing. It provides a wide range of features like APIs, web services, etc and also supports multiple platforms like desktops, web, and mobile. UFT scripts are written in visual basic scripting language.

    93.What is Appium Automation testing tool. 

    Ans:

    • Appium is an open-source mobile application testing tool. It is used to automate testing on cross-platform, native, hybrid and web-based mobile applications. Appium automates any mobile application from any language with full access to APIs and DBs from the test code.
    • Appium is based on the client-server architecture and has evolved from selenium.

    Are you looking training with Right Jobs?

    Contact Us
    Get Training Quote for Free