Monday, 4 April 2022

Top Appium Testing Interview Questions and Answers SET - 02?

 



Mobile Automation Testing Appium INterview Q&A SET - 01

Top API Interview Question 1-10

In this post we will go through the most asked Appium Testing Interview questions and answers, let’s start with the second set of the Appium Testing series. For the first series of 

Appium Interview questions and answers in the link below: 

Mobile Automation Testing Appium Interview Q&A SET - 01


Appium is one of the most popular mobile test automation tools, and mobile automation is becoming increasingly popular.


Appium is an open source automation tool for running scripts and testing native applications, mobile-web applications and hybrid applications on Android or iOS using a webdriver.



11. How do I create a new session in Appium?

Ans:

DesiredCapabilities desiredCapabilities = new DesiredCapabilities();

desiredCapabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "10.3");

desiredCapabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "iPhone Simulator");

desiredCapabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, "XCUITest");

desiredCapabilities.setCapability(MobileCapabilityType.APP, "/path/to/ios/app.zip");


URL url = new URL ("http://127.0.0.1:4723/wd/hub");


IOSDriver driver = new IOSDriver(url, desiredCapabilities);

String sessionId = driver.getSessionId().toString();



12. What are the Locators used for Mobile Automation Testing?


Ans: Click Here For Mobile Testing Locators


13. How to run tests on Emulators?


To run tests on emulators, use the AVD Manager included with Android Studio or the SDK. With this tool, create the emulator that matches your needs. With the emulator launched, Appium will automatically find and use it for its tests.


14. What are the steps to perform Android Automation on a Real Device?

For Android automation, no additional setup is required for testing on real devices, other than these simple requirements:

  • Ensure that Developer mode is turned on for the device.
  • Ensure that the device is connected via USB to the Appium host, and can be seen by ADB (run adb devices to make sure).
  • Ensure that "Verify Apps" in settings is disabled, to allow Appium's helper apps to function without manual intervention.


15Mention the Automation engine for Android and IOS?

Ans: Click Here For Answer



16. How to retrieve Appium server current status?

Ans: driver.getStatus(); 17. How to execute a native mobile command in Appium?

Ans: driver.executeScript("mobile: scroll", ImmutableMap.of("direction", "down"));

Syntaxexecute("mobile: <commandName>", <JSON serializable argument>) (see Execute Script for more details on syntax).


*************************************************

Check Selenium-SDET-UIAutomation Questions 

 Question Set 31-40  

Q&A Set 41-50

******************************************************

18.  What are the important Appium Desired Capabilities?

Ans: Click Here For Answer


19. How to retreive Capabilitites of Specified Session in Appium?

AnsMap<String, Object> caps = driver.getSessionDetails();


20. How do I use Find Elements to identify Mobile elements?


Ans: 
MobileElement elementOne = (MobileElement) driver.findElementByAccessibilityId("SomeAccessibilityID");

MobileElement elementTwo = (MobileElement) driver.findElementByClassName("SomeClassName");


21. What is the most used ADM command you have come across while working with Appium?



22. How do you execute your Appium Automation suite on Cloud Devices?


==>. How can we verify the Appium installation and what is Appium doctor?


Ans:   To verify that all of Appium's dependencies are met we can use appium-doctor.


Install it with commandnpm install -g appium-doctor, then run the appium-doctor command, supplying the --ios or --android flags to verify that all of the dependencies are set up correctly.


==>. What is the default port for Appium?

Ans: 4723 

This port information is important since we will have to direct your test client to make sure to connect to Appium on this port. If you want to change the port, we can do so by using the -p flag when starting Appium.

==> What are the important Appium Desired Capabilities?

Ans

{

"platformName": "iOS", "platformVersion": "11.0", "deviceName": "iPhone 11", "automationName": "XCUITest", "app": "/path to app" }

==> Mention the Automation engine for android and IOS?

Ans:
Android: UiAutomator2
IOS : XCUITest

*******************************************************************
For any doubts or career guidance, arrange a 1:1 call with me 


********************************************************************

Check below link for question and answers with code:

Top API Interview Question 1-10

*************************************************

SeleniumWebdriver Automation Testing Interview Questions:

API Testing Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Rest-API

 
Kubernetes Interview Question Set
https://automationreinvented.blogspot.com/search/label/Kubernetes

 
Docker Interview Question Set
https://automationreinvented.blogspot.com/2020/02/top-18-docker-commands-for-aytomation.html

 
Linux Interview question Set
https://automationreinvented.blogspot.com/search/label/Linux

 
Automation Testing/SDET Framework Design
https://automationreinvented.blogspot.com/search/label/FrameworkDesign


Java Related Interview Question Set

https://automationreinvented.blogspot.com/search/label/Java


GIT Interview Question Set:
https://automationreinvented.blogspot.com/search/label/GIT


Coding Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Coding%20Questions

Rules of Naming a variable in python?

 


This article describes the standards that apply to variable names. All of the listed recommendations are mandatory unless noted otherwise.


Rules of Naming a Variable in Python:

  • A variable name must start with a letter or the underscore character
  • A variable name cannot start with a number
  • A variable name can only contain alpha-numeric characters and underscores (A-z, 0-9, and _ )
  • Variable names are case-sensitive (age, Age, and AGE are three different variables)

# valid variable names

myV = 1

testVar = "var"

_thisVar = 20.2

_Thisvar = "testing"

Test_Var = "good"

TestVar = "testin"


# invalid variable names

-variable = 12

3variable = "badName"

my variable = "error"



Multiple Variable Assignment:

You can assign values to any number of variable in a single line, see the example below–

Example

x, y, z = 1, 2, 3

print(x)

print(y)

print(z)

Output

1

2

3


Learn (API-Microservice)Testing+(CoreJava+UI)-SDET with Self Paced Videos and one LIVE Doubt Session

SDET TRANING VIDEOS AVAILABLE with Live Doubt Session(course-1 below,API TRaining Videos With ClassNotes and Coding Set) and (API+UI, both course-1 & 2 below) Check Training Page for Course Content or reach out @whatsapp +91-9619094122

Check below link for question and answers with the code:

Top API Interview Question 1-10

Top API INterview Questions 11-20 

Top API AUTOMATION Interview Q&A - 21-30

*************************************************

SeleniumWebdriver Automation Testing Interview Questions:

https://automationreinvented.blogspot.com/search/label/SeleniumWebdriver

API Testing Interview Question Set:

https://automationreinvented.blogspot.com/search/label/Rest-API

 

Kubernetes Interview Question Set

https://automationreinvented.blogspot.com/search/label/Kubernetes

 

Docker Interview Question Set

https://automationreinvented.blogspot.com/2020/02/top-18-docker-commands-for-aytomation.html

Linux Interview question Set

https://automationreinvented.blogspot.com/search/label/Linux

Automation Testing/SDET Framework Design

https://automationreinvented.blogspot.com/search/label/FrameworkDesign

Java Related Interview Question Set

https://automationreinvented.blogspot.com/search/label/Java

GIT Interview Question Set:

https://automationreinvented.blogspot.com/search/label/GIT

Coding Interview Question Set:

https://automationreinvented.blogspot.com/search/label/Coding%20Questions

Mobile Testing Interview Question Set:

https://automationreinvented.blogspot.com/search/label/Mobile%20Testing

Python Interview Question Set for QAE - SDET - SDE:

https://automationreinvented.blogspot.com/search/label/Python



Sunday, 27 March 2022

What is Json Schema and how to perform schema validation using Rest Assured?



Check below link for question and answers with code:

Top API Interview Question 1-10


 


Table Of Contents:

What is Schema?

Why JSON Schema Validation is required? 

How to automate schema validation with Rest Assured?

COMMON ERROR found in schema validations

How to perform manual schema validation


What is Schema?

 Schema is nothing but a JSON file. It will only have datatype information and the expected keys of the JSON. There won't be any values present in the schema. 


Schema is an important concept to learn. JSON Schema is a JSON media type for defining the structure of JSON data. JSON Schema provides a contract for what JSON data is required for a given application and how to interact with it. JSON Schema is intended to define validation, documentation, hyperlink navigation, and interaction control of JSON data.

SDET Interview Question and Answers.  

Jenkins Interview Questions and Answers


Why JSON Schema Validation is required? 

JSON Schema Validation is required to monitor API responses and ensure that the format that we are getting is the same as the expected one.


****************
Appium Interview Questions and Answers

Selenium Interview Questions and answers


**************

                    How to automate schema validation

  • Step-1: Add below dependency:

 



  • Step-2: Load expected schema

Load the expected "schema.JSON" in a file object.
You can create a schema from json using below website:

https://www.liquid-technologies.com/online-json-to-schema-converter

  • Step:3. Validate using matchesJsonSchema

Validate the response body using the matchesJsonSchema method. 

GIT Interview Questions and Answers






COMMON ERROR found in schema validations are:


Error:(common errors in your current project)

object has missing required properties 

instance type (integer) does not match any allowed primitive type (allowed: ["string"])


                   How to perform manual schema validation

TO COMPARE SCHEMA MANUALLY use below website:

http://www.jsondiff.com/
In the above we can paste both the schemas and do a comparison


Learn (API-Microservice)Testing+(CoreJava+UI)-SDET with Self Paced Videos and one LIVE Doubt Session

TRANING VIDEOS AVAILABLE with Live Doubt Session @4500/-(course-1 below,API TRaining Videos With ClassNotes and Coding Set) and 6500/- (API+UI, both course-1 & 2 below) Check Training Page for Course Content or reach out @whatsapp +91-9619094122


Entire course content can be found below:  COURSE CONTENT

SDET Interview Question and Answers

TestNG Interview questions and answers

Jenkins Interview Questions and Answers

Appium Interview Questions and Answers

Selenium Interview Questions and answers

Java Coding Interview Questions and Answers

GIT Interview Questions and Answers



Check below link for question and answers with code:

Top API Interview Question 1-10

*************************************************

SeleniumWebdriver Automation Testing Interview Questions:

API Testing Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Rest-API

 
Kubernetes Interview Question Set
https://automationreinvented.blogspot.com/search/label/Kubernetes

 
Docker Interview Question Set
https://automationreinvented.blogspot.com/2020/02/top-18-docker-commands-for-aytomation.html

 
Linux Interview question Set
https://automationreinvented.blogspot.com/search/label/Linux

 
Automation Testing/SDET Framework Design
https://automationreinvented.blogspot.com/search/label/FrameworkDesign


Java Related Interview Question Set

https://automationreinvented.blogspot.com/search/label/Java


GIT Interview Question Set:
https://automationreinvented.blogspot.com/search/label/GIT


Coding Interview Question Set:
https://automationreinvented.blogspot.com/search/label/Coding%20Questions

All Time Popular Posts

Most Featured Post

𝗦𝘁𝗶𝗹𝗹 𝘀𝘁𝗿𝘂𝗴𝗴𝗹𝗶𝗻𝗴 𝘄𝗶𝘁𝗵 𝗝𝗮𝘃𝗮 𝗰𝗼𝗱𝗶𝗻𝗴 𝗿𝗼𝘂𝗻𝗱𝘀?

❓ 𝗦𝘁𝗶𝗹𝗹 𝘀𝘁𝗿𝘂𝗴𝗴𝗹𝗶𝗻𝗴 𝘄𝗶𝘁𝗵 𝗝𝗮𝘃𝗮 𝗰𝗼𝗱𝗶𝗻𝗴 𝗿𝗼𝘂𝗻𝗱𝘀? The issue isn’t your logic—it’s the lack of pattern recogniti...