Pages

Thursday, 21 April 2022

How to Create Android Emulator device for Mobile Testing? How to create virtual device in Android Studio?

 

Mobile Automation Testing Appium INterview Q&A SET - 01

Mobile Testing Interview Q&A Set - 02

Top API Interview Question 1-10

Emulator

Android emulator is a tool that creates virtual Android devices (with both software and hardware), emulators are very important to perform Mobile Testing, below are the steps to create a Android Mobile device which we can use for Mobile Testing on any Android Version.

It mimics the hardware and software of the target device on your computer. They do this by translating the ISA (Instruction Set Architecture) of the target device to the one used by the computer you are using to conduct testing using binary translation.

The Android Emulator for PC replicates a browser or an Android App, on a defined operating system (like Windows or Mac). It attempts to create virtual hardware conditions for an Android device, which can be used for the purpose of testing and debugging. There are multiple Android Emulators Online in the market like Andy Emulator, which have their own set of limitations and will never provide a real device environment for bug-free testing.

In my ten years of experience, I have observed that when we want to test mobile applications, we always prefer to do the dry run on emulators. In fact, most organizations prefer emulators to run a regression suite for appium testing. So it is quite vital to know about emulators and how to create one for Appium testing.


Step - 01

First, make sure that you have Android Studio downloaded on your machine. 

It is quite easy to download Android Studio from below link:

Download ANDROID STUDIO


Step -02:

Open Android Studio and click on "Configure" option, after that select the "ADB Manager" from the list as shown in the below screenshot


 Click Here For Test Scenarios On API Testing

 Step - 03:

Now click on "Create Virtual Device" button, you will be redirected to "Select Hardware" page, where we need to select the mobile type, for example "Pixel XL" as shown below, and then click on "Next"


 

Step - 04:

After the "Select Hardware" page you will be able to see the "System Image" page,  here we need to select which Android version we want in our mobile device for testing, for example Pie, Oreo, R etc.
In below image you can see that I have selected Android 11, then click on Next:

How to Create Stub with Wiremock for API Testing?

Step - 05:

Now you will at "Verify Configuration" page, here you can check the selection we have done in step 3 and step 4, provide the name of your device as I have given the name "AndroidMobile" in below screenshot:




Here you can change the Memory and Storage too by clicking on "Show Advanced Settings", you will get the options as shown below, now click "Finish"



Step - 06:

Now the device is created and in the dashboard we can see it, search with the device name that we have provided in Step-05 as shown below, now just click on the Play button and the device is ready for testing :)



Now perform testing by dragging your .apk to the newly created virtual device.


INSTALL APK


There are many websites that provide the sample apk, which can be used for testing. If you do not have any .apk or .ipa files, you can run your sample tests, you can use the practice apk HERE

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

SeleniumWebdriver Automation Testing Interview Questions:

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

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

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



Monday, 18 April 2022

Top 22 Python Interview Questions and Answers on String ? String manipulation with Python

 



Python Interview Question & Answers Set - 01

Automation Testing/SDET Framework Design Link

Java Related Interview Question Set LINK

GIT Interview Question Set LINK 

12. How to define a multiline string in python?

Ans :
str = """This is 
a multiline
string"""


If you are preparing for Selenium-Python Interview then also check below Q&A:


Python Interview Question & Answers Set - 01

Python Interview Q&A Set - 02

Python Interview Q&A Set - 03


13.  Let str = "string", then what is the output for print(mystr[-2:-1]) # 'n'

Ans: answer is "n"

14. How to concatenate string in Python?
    
Ans: we can do it in below three ways:

x = "Test "
y = "Automation"
z = x + y
print(x + y)
print("Test " + "Automation")
print(z)

15. What are the python frameworks you have used for Test Automation?

Ans:
 Click Here For Answer

16. What is the output for below :

print("2.2" + "4.4") 



Ans: 2.24.4


17. What is the use of format() in python?


We can use the format() method after strings which are used to insert specified values inside strings.

We use “{}” to insert specified values.

There are three ways to insert values.

1. {valuename}

2. {valueindex}

3. {}


Example

print("Name:{name} and age:{age}".format(name=“Sid”, age=31))

print("Name:{0} and age:{1}".format(“Sid”, 31))

print("Name:{1} and age:{0}".format(“Sid”, 31))

print("Name:{} and age:{}".format(“Sid”, 31))


Output

Name:Sid and age:31

Name:Sid and age:31

Name:31 and age:Sid

Name:Sid and age:31

18.  What re the rules of variable naming in python?

Ans: Click Here For All The Rules

19. Correct the below string:

print(“He is "A" genius”)


Ans: This will give syntax error, If we use backslash “\” followed by the character like ” then the problem will get resolved.


print(“He is \"A\" genius”)


20. How to replace Genius with fool in below string?
 Str = "He is a genius"


Ans: print(Str.replace("genius","fool")


21. What are the different environment variables in Python?

Ans: 

  • PYTHONPATH [locate the module files imported into a program]
  • PYTHONSTARTUP [contains the path of an initialization file containing Python source code]
  • PYTHONCASEOK [used in windows to instruct Python to find the first case-insensitive match in an import statement]
  • PYTHONHOME [it is an alternative module search path]

22. How to check number is prime or not in python?

Ans: num= 7
count=0
if num>1:
for i in range(1,num+1):
if(num%i)==0:
count=count+1
if count==2:
print("Number is prime")
else:
print("Number is not prime"

Important Escape Characters


Escape CharacterName
\’Single Quote
\\Backslash
\nNew Line
\tTab
\bBackspace
\”Double Quote

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
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



Monday, 4 April 2022

Top 11 Python Interview Question and Answers for QA - SDET - Dev ? Must know concepts of python basics?

 


Automation Testing/SDET Framework Design Link

Java Related Interview Question Set LINK

GIT Interview Question Set LINK 

Python is one of the most important language to learn in present era, so to help you all below are the Top 11 Python Interview questions and answers for your interview preparation and guide to learn the crucial concepts.

Selenium Interview Questions and answers

Java Coding Interview Questions and Answers

GIT Interview Questions and Answers


If you are preparing for Selenium-Python Interview then also check below Q&A:


Python Interview Question & Answers Set - 01

Python Interview Q&A Set - 02

Python Interview Q&A Set - 03

1. What is Identation in Python?

Ans: Indentation is defined as the no. of white spaces that are used to define a specific area or block or region and this is a convention in python.


2. How many white spaces for the main function region of python?

Ans:  Four white spaces to define the main function’s region or block which is called indentation and it’s usually four. This is one of the main differences between other languages and python.

3. What are the python frameworks you have used for Test Automation?

Ans:
 - Robot
- Pytest
- Test Project

To learn more about the Robot framework, refer the link: Robot Framework

4. Tell me some of the comments types you have used in your code?

There are two types of comments:

  1. Single-Line Comments
    Single line comments start with “#” for example : # This is a single line comment in Python

  2. Multi-line Comments
    If you put anything inside a multiline string(triple quotes) anywhere in your code then that will be called multiline comments, for example:

    print("Example of multiline comments")

    """This is

        a multiline

        comment in python

    """

5. What will be output of below code:

x = 20  

x = "test"

print(x)

Ans: test


6. What re the rules of variable naming in python?

Ans: Click Here For All The Rules


7. What is the use of type() in python?


Ans: Python uses “type()” to determine the type of any datatype, see the example below–

Example

x = 2

y = “test”

z = [“test”, 1]

print(type(x))

print(type(y))

print(type(z))


Output

<class 'int'>

<class 'str'>

<class 'list'>


8. How to convert an integer to string in python ? How to perform typecasting?


Ans:
var = 23

varString = str(var). //convert the int datatype to string


9. What is complex datatype in Python?


Ans: In Python, “complex numbers” are created using “j” after a number.


Example

x = 12 + 5j

y= 2j


10. Let we have below string, we want to print only Automation


x = "TestAutomation"


Ans: print(mystr[4:len(mystr)])


11. How to define multiple variables with single line in python?


Ans: Click Here For Answer



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
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