Interview Things
Interview Things
- Smoke
- Regression
- Functional
- Integration
- Positive – Negative testing
- Black-box
- Ad-hoc (random testing)
- 60-70% I was doing automation, 30-40% manual testing, but I always help other
manual testers as a cross-functional team member.
- I have worked on UI testing, backend testing, and API testing.
3) What is Jenkins ?
- We had daily stand up meetings, sprint grooming, sprint planning, sprint demo,
sprint retro meeting.
- Planning : app ve yeni feature hakkinda bilgi aliyoruz. ( first day of sprint )
- Yes, I worked with offshore teams before, we had meeting on late nights or very
earlier in the morning. It is not a problem, I can work with offshore teams.
- Dependencies (maven)
- (TDD)
- Annotations (@BeforeMethod, @BeforeTest, @Test, @AfterMethod, @AfterTest)
- Assertion (AssertTrue, AssertEquals, AssertFalse)
- TestNG.XML
12) What is JUnit ?
- public
- private
- protected
- default
- Feature file : I’m writing scenarios (and scenario outline) with Gherkin.
- Step definitions : I m implementing feature file scenarios to java test class.
- Runner class : I m using Runner class to run my test suits.
- Hook class : I m using @Before and @After annotations and reusable methods.
20) Can you explain your smoke and regression suite in your last project ?
- I used Git and GitHub for version control and store my code.
- I’m using git commit, push and pull commends.
- Class : is a template
- Object : comes from the class, object is an instance of the class.( object class’in
ogesidir.)
toUpperCase()
toLowerCase()
length()
contains()
substring()
indexOf()
- String immutable
- StringBuffer mutable
- StringBuilder mutable
- We have 4 loops
- For loop, while loop, do while loop, for-each loop
- as
- Final :
if variable is final, it means its unchangeable
if method is final , we can not override
if class is final , we can not inherit
- Finally : keyword for try-catch block, it is working no matter what.
- Finalize : for garbage collector
- Encapsulation
- Inheritance
- Abstraction
- Polymorphism
37) ENCAPSULATION
- Data hiding
- Making variable private
- You can access private variables with getter / setter methods.
38) INHERITANCE
40) INTERFACE
41) POLYMORPHISM
- For example when we create a driver object from WebDriver interface or when we
create an ArrayList from List interface we are using polymorphism here.
- Concrete class implements all methods of reference class (parent)
42) OVERLOADING
println()
println(String x) same method name, different signature, overloading
println(int x) same method name, different signature, overloading
43) OVERRIDING
- It is a collection of a data.
- We are storing multiple datas in one array.
- Array is Fixed Size
- Array cannot be resized / modified.
- Same data type (all elements are int or all string)
cities.add(“New York”);
cities.add(“Washington”); we can add values, resizable
cities.remove(“New York”); we can remove values, resizable
- Collection is an interface
- LIST and SET comes from Collection.
- List ArrayList, LinkedList
- Set HashSet, TreeSet
- List ArrayList
- Set HashSet
example:
- NoSuchElementException
- WebDriverException
- TimeOutException
(advantages)
- Selenium is open source
- Selenium supports multiple browsers
(disadvantages)
- Selenium supports only web-based apps.
- Selenium does not support operation systems (windows, mac) apps.
- We can not test desktop applications using Selenium.
- Selenium cannot automate CAPTCHA.
- getText()
- getTitle()
- sendKeys()
- sendKeys(“Selma” + Keys.ENTER)
- Launching browser:
WebDriver driver = new ChromeDriver();
- We have 8 Locators
- id , name , className , Xpath , CSS , tagName , linkText , partialLinkText
- if I have id or name I’m using them, else I prefer to use XPath.
58) What is the differences between absolute XPath and Relative XPath ?
- //tagname[@attribute=’value’]
ex:
//input[@id=’selma’]
60) How can you go to second element with XPath ?
- (//input[@id=’fatih’])[2]
//input[contains(@name, ‘sel’)]
//input[@id=’submit’ AND @name=’btnLogin’]
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS)
- NoSuchElementException
- ElementNotVisibleException
- TimeOutException
- WebDriverException
solution:
- Sleep a little bit. Thread.sleep(2000)
- Locate the element again.
SelectByVisibleText()
SelectByIndex()
SelectByValue()
driver.switchTo().frame(“…”); go to iframe
driver.switchTo().defaultContent(); go to main page
68) How can you handle mouse actions ?
action.build();
.perform();
.doubleClick();
.drugAndDrop();
.clickAndHold();
.moveToElement();
driver.switchTo().window(windowHandle);
isSelected()
isDisplayed()
isEnabled()
- findElement()
Returns the first most web element if there are multiple web elements found
with the same locator.
It will only find one web element
- findElements()
Returns a list of web elements
CUCUMBER (BDD) – Interview Review
- Because of AGILE.
- Feature files
- Step definitions
- Runner Class
@regression
Feature: Amazon HomePage
@RunWith(Cucumber.class)
@CucumberOptions(
features = “feature files”,
glue = "step definitions",
tags = ”@regression”,
plugin = ”reports”,
dryRun = “generate annotations for step definitions”)
- We are using Maven , Java , Selenium , JUnit , Cucumber based on page object
model.
- we can use Scenario outline for same scenario with multiple sets of data.
- We use “scenario outline” with “examples” table.
- Scenario icin outline hazirliyoruz , bosluklara datalari her seferinde tekrar otomatik
doldurup testi run ediyor.
@smoke
Scenario Outline: Manupulate Login Test With Data
Given <name> has a valid credit or debit card
And his/her account balance is <accountBalance>
When he/she insert the card
Then he/she should see account balance is <currentBalance>
Examples:
Acceptance criteria
User story
Velocity
Priority / Severity
SDLC
STLC
Defect life cycle
What to do when you find a defect
Test plan
Test case
Requirement Traceability Matrix (RTM)