AUTOMATION Tutorial Course
Behavioural Questions
Tell me about yourself and your experience
This is the most common question asked in Automation Testing interview. Typical answer goes like below.I have 10+ years of experience in automation testing. I have worked for clients like RACQ, CTM, Sunsuper, Allianz, Unify, Great Southern Bank. I have vast experience in diverse automation technologies.
Tell about your current role and responsibilities
- Currently I work as an automation engineer in XYZ project
- Responsibilities include writing tests, executing tests on cloud, checking reports, automation of new tests and Maintainance of tests on Bamboo server and Cross browser testing on browsers and mobile devices.
- Tools used in the project are cucumber, groovy, Maven + Java, RestAssured, Appium, Bamboo, Docker, C#.Net + Specflow.
Tell 3 strong qualities and weak qualities
My strong points - I have skills in hot technologies like UFT, Jira, Selenium, Appium, AWS, Docker, Cucumber + Collaberation. So I am right fit for the role. I also have good Work ethics, Flexibility in terms of work, Commitment to work, Honesty and Integrity. I can easily Adapt to New tech stack.My weak points - I need improvement in Communication and presentation.
Why I should hire you?
I have a Passion for automation. I write tech blogs and books on automation technologies. I also contribute to open source project on github.What Challenges you faced?
Here are some of the challenges I faced- Ambiguous Requirements of software
- People not sticking to Scrum process - e.g. not changing ticket status, not adding enough description and comments on tickets.
- Code review process - e.g. In some projects, code review is not being done so debt keeps growing. All team members not following coding guidelines.
- Team member conflicts
- Weak CI/CD process - Infrequent code Integration, kicking off tests manually after build is deployed, no rollback strategy
- Cross browser testing challenges
- Flaky results due to Synchronization issues
- Dependency on devops to run tests in ci and cd
- Technical Challenges - Cross browser challenges, Synchronization, EMAIL VERIFICATION, BIOMETRICS VERIFICATION
- At CTM, code review and coding conventions were not being followed properly. So improved the process.
- At unify solutions, Client wanted us to execute regression tests on 10 devices. I convinced them that this is like a burning a fingure and they said let us do risk based testing. 1 device from each OS and 3 screen sizes.
- At Allianz, Regression tests took 3 hours to execute. So I optimized test suite by removing non critical tests and also removing hard coded wait statements.
- At Sunsuper, lot of code duplication was found in tests. And also They had 500 team city builds. I proposed them that tests can be grouped based on functionality and builds can be reduced. Also scrum tickets did not have proper titles and description. I also recommended them to get rid of old tools like Quality Center and TFS.
Any major Achievements?
Answering this question should be easy. Just explain how you overcame challenges mentioned in above question.Any conflict of opinion with team member and how you resolved it?
Team was using different builds for testing each API. I told them to group apis in single build to avoid duplicate code. But Team disagreed. So I explained the benefits of grouping APIs and convinced them!STAR based Questions
STAR stands for Situation, Task, Action, Result.Pressure situation
Tell me about challenging pressure situation and how did you fix it - Manager asked me to take over the execution of regression suite even though I did not work on it before. So it was a difficult situation. I told her that Since I am doing this first time, I will need assistance from the Team and with the help from team members I was able to complete the task.Any initiative you took?
any time you went above and beyond?
Lot of tests were failing and not stable. So I took initiative to fix the existing issues in the test and optimized the queries.This was in addition to my existing project work.Any situation you could have handled in a better way?
I was working on a project independently and my work was not reviewed by anyone until last stage. So I should have proactively asked for the review from someone in other team.Any defect leaked into production?
I did not test all enum values of an API and for one of the enum, mapping was invalid in database. I think I should have added the test for that scenario.Technical Interview Questions
Which Tech Stack you used?
You can explain what technologies you used in project. e.g. Azure, JavaScript, React, Selenium, Java, Jira Interviewer may ask follow up question on this techonlogies so you need to be comfertable with answering such questions.Here are some of the tech stacks used in automation testing projects.
- Java + maven + junit + Selenium + cucumber + Postman
- Java + gradle + testng + Selenium + Postman
- Python + Selenium + Robot framework
- C#.net + Selenium + specflow + RestSharp
- JavaScript + Selenium + NodeJS API testing
- Typescript + Mocha + Chai + Selenium + NodeJS API testing
- Java + Selenium + API testing with RestAssured
- API testing with ReadyAPI + Performance Testing with Jmeter
- C#.Net + Mobile Testing + Appium
- Java + Mobile Testing + Appium
- JavaScript + Mobile Testing + Appium
How to do performance testing
- Tools - Jmeter, Charles Proxy, Fiddler
- Threads
- Reports
- Metrics - Throughput
XPATH vs JSONPath
XPATH AND JSON PATH - https://jsonpath.com/ and http://xpather.com/Description | XPath | JSONPath |
---|---|---|
the root object/element | / | $ |
Current object | . | @ |
Child operator | / | . or [] |
Parent Operator | .. | N/A |
Recursive Descent | // | .. |
Wildcard | * | * |
Attribute access | @ | N/A |
Subscript Operator | [] | [] |
Union Operator | | | [,] |
Array Slice Operator | N/A | [start:end:step] |
Filters | [] | ?() |
Script Expression | N/A | () |
Grouping | () | N/A |
Explain git workflow
We need to Clone a repository then Create feature branch and make changes in feature branch. Then we need to Build, Deploy to feature url. Tester can test the feature on feature branch.Important automation testing concepts
- UFT - Object repo vs Descripting programming, UFT vs LeanFT, UFT vs Ranorex
- Jira - Sprint vs Kanban Board, Jira Workflow, Integration with Version control system, Agile vs Waterfall models, Using code feature to style the text, Epic vs Ticket, Writing filters, Configuring boards and dashboards, creating projects
- GIT and GITHUB - Cloning repo, How to commit, pull and push changes, How to resolve conflicts, How to revert the changes, How to view changes, Git branching models, Working on Github, Creating pull requests, Reviewing changes and approving pull requests
- Cucumber - Hooks and cucumber options for rerunning failed scenarios, generating reports, tagging scenarios and running specific tags with AND, OR, XOR combination, Gherkin, BDD
- Difference between testng and junit - When to use JUnit and TestNG, Various annotations, Creating test skeleton
- Difference between maven and gradle - What are the pros and cons of both tools, maven phases and goals, Maven profiles, Maven repo, Maven plugins, View dependency tree
- Linux and powershell commands - All important linux commands, Frequent linux tasks that can be automated, Writing shell scripts, Profiles, Shell variables, User variables, Package managers and Installations, Vagrant, Difference between Desktop, VM, vagrant and Docker
- Appium vs Selenium - How appium is different, Page object models
- Appium on Mac - Running tests on iPhone, iPad simulators
- AWS, Bamboo and Docker - Creating EC2 instances and configuring it with docker, bamboo agent process and running tests on it, Bamboo tasks for AWS plugin, Deploy plugin, Teamcity and Jenkins
- Jmeter - How to use Jmeter to do performance testing, HTTP config element, Extracting data from JSON responses using JSON extractors, Extracting data from response headers, Using HTTP header elements, Creating thread groups, Generating reports using report elements
- Java - core OOPS concepts, Classes vs Interfaces, Generics, static and singlton, multi-threading, collections, Serialization and Reflections, Casting objects and type conversion, Final vs Static, Utility classes, Regular expressions, Useful libraries e.g. apache common, Mustache, Springboot and Database handling, Input and output, File handling
- C#.Net - Build management tool - MSBuild, Package management - Nuget, Important namespaces and classes, Data types and type conversion, OOPS concepts, Strings, Regular Expressions, File handling, Collection and Generics, Anonymous methods, Properties (getters and setters),
- Javascript - Objects and classes in Javascript, ECMAScript Versions, Javascript frameworks, DOM vs BOM, Events, Apply, call bind, this object, closures, Hoisting variables, including js files in other file
- IntelliJ - Tips and shortcuts in IntelliJ IDEA
- SQL - all important sql queries, joins, finding unique and duplicates, sql functions, triggers and procedures
- Protractor - How to write and execute tests in protractor, Javascript test frameworks
- Rest endpoint testing - RestAssured, Postman, SoapUI
- Security testing
- Optional things - Groovy, Python, Ansible, React and Node.js, NPM, Spring boot, Tosca, TestComplete
What are the Automation testing benefits?
Some of the benefits of automation testing are quick time to test, continuous integration, Accuracy, Regression testing through automation can save lot of time and resourcesAutomation testing drawbacks and limitations?
Here are limitations and drawbacks of automation testing.- not everything can be automated
- false negative test results
- Initial investment is more in automation testing
- Maintainance costs are high if application is changing frequently
- Programming Skills are needed to do automation scripting
Daily activities
- Attend daily standup
- Understand requirments and ask questions on requirements
- Writing functional tests as per user stories or business requirement document
- Writing non-functional tests (Performance testing) like throughput and server load
- Writing Security test scenarios
- Designing automation framework
- Version control - git e.g. github, stash, gitlab. git branching stategy, git branch protection rules to enforce pull request reviews, git webhooks - to notify external services when certain event happens, git - add secrets
- Test execution and result analysis - We can use report plugin to show graphical reports e.g. Extent report. Tag automation test cases so that filtering is possible. Filtering is also possible based on the test tool that you use.
- Raise the bugs with screenshot and video recording and stop the build from progressing to next stage. Regression testing usually is done in SIT and UAT. If the defects are found, we need to work together and fix the defect, retest and then we can deploy the build to next environment e.g. staging or production
Explain Automation Framework
- Config manager - variables
- logging and Reporting framework
- Data modelling
- Design pattern - Page object models
- CI CD integration - Running tests in cloud e.g. AWS, Azure devops, CI server - Jenkins, Teamcity, Bamboo and Integration of git repo and triggering tests using git post-recieve hook
- BDD or TDD - In bdd frameworks, state can be shared between test definitation classes using dependency injection
Explain Explicit vs Implicit timeouts
Explain Mobile Automation
Mobile traffic is more than the desktop traffic. Look at the stats - https://gs.statcounter.com/browser-market-share/mobile/worldwide We can use simulators or real devices for testing mobile apps. Main cloud players in automation testing are Browserstack, Saucelabs and Experitest. Main challenges in mobile automation are Biometrics - Face, fingerprint authentication (Solution is to use stubs) and Scanning of documents with live camera (Solution is to use stubs)Cross browser testing
Explain in detail approach to do cross browser testingAPI testing
You must know below stuff before appearing for an interview for an API tester role.- Rest - Representational State Transfer vs SOAP - Simple Object Access Protocol
- WADL (REST)
- WSDL - Web service description language vs UDDI - Universal description, discovery and integration
- Various Content Types - e.g. application/json
- Authentication mechanisms - Basic, Bearer
- HTTP Protocol - HTTP
- tools - Swagger/Open API, Jmeter, Postman, newman, Readyapi
- Unit testing and API Frameworks - Mocha, Chai, RestAssured, RestSharp
- Synchronous tests vs Asynchronus tests
- Restful Constraints - Uniform interface , Layered System - proxy can be added, Cacheability, Client server architecture, Statelessness
- How to intercept the request
1let chai = require('chai')
2 let chaiHttp = require('chai-http')
3 chai.use(chaiHttp)
4
5 describe('Suite', () => {
6
7 it('T1', async () => {
8 let response = await chai.request("http://localhost:3000/api/hello")
9 .get("/");
10 chai.expect(response).to.have.status(200)
11 })
12
13 it('T2', async () => {
14 let response = await chai.request("http://localhost:3000/api/contact")
15 .post("/")
16 .set("Content-Type", "application/json")
17 .send({ "name": "n1", "email": "[email protected]", "phone": "0400000", "message": "M1" })
18 chai.expect(response).to.have.status(200)
19 })
20
21 it('T3', async () => {
22 let response = await chai.request("https://jsonplaceholder.typicode.com/users")
23 .get("/1")
24 .set("Content-Type", "application/json")
25 chai.expect(response).to.have.status(200)
26
27 //body
28 chai.expect(response.body.id).to.be.equals(1)
29
30 //headers
31 chai.expect(response).to.have.header('Content-Type', 'application/json; charset=utf-8');
32
33 //extract header value
34 console.log('log -> ', response.header['content-type']);
35
36
37 })
38
39 })
Coding problems
Setup simple automation framework
You can choose any language and IDE of your choice and setup automation framework. e.g. Using JUnit and Selenium, you can create a simple framework to create tests and run them in IntelliJ IDEA.Automate given website
You can choose any language and IDE of your choice and write a code to automate website. It is important to develop the code that works - launches browser and performs automated tasks.Testing Concepts
Give example of low severity and high priority defect?
Logo is not looking good.Write test scenarios for uploading image?
Some scenarios can be- User should be able to upload image successfully
- If user tries to upload invalid file, error should be displayed
- If user tries to upload a file which is exceeding the limit, error should be displayed
- If user tries to upload a file that does not meet specifications like dimensions or quality, error should be displayed
Software development models
- Waterfall
- Iterative
- Spiral
- V Shaped
- Agile - Minimum viable product
what is scrum?
Scrum is an agile style software development framework. Scrum has timebox iterations. Sprints are of 2-3 weeks long. Daily sprint meetings (Daily Scrums) occur (typically followed by Amigos or Huddle) and You need to Retros happen at the end of each sprint. In scrum, there are mainly 3 roles.- Product (Business) owners
- Scrum master
- Development team
Sprint board vs Kanban board
Kanban board is used for maintainance type of project where the work is not planned. Kanban is a lean method. Sprint board is used for greenfield projects.Difference between scrum and sprint
Scrum is made up of multiple sprints. A sprint duration is normally 2 weeks.Testing level or phases
- Unit testing
- Component
- Integration
- System
- UAT (Acceptance testing)
- Alpha beta testing
Testing approaches?
- Static
- Dynamic
- blackbox
- whitebox
- grey box
- regression
- Smoke test (Build verification test. Generally done before build is given to testing team)
- Sanity testing (quick tests of critical features and advantage is that we get quick feedback)
Explain Test techniques
Test techniques include Compatibility testing, Exploratory Testing, State Transition Testing, Boundary Value Analysis, Equivalence Partitioning, Usability, Accessibility, Security testing, Performance testingExplain Defect lifecycle
new, assigned, open, fixed, restest, closedExplain spotify model
Spotify tribe model - structuring the organization to scale agility. tribe trio form the alliance tribe lead product lead design lead A tribe can have multiple squads - chapter is a team formed with members from different squad in same tribe. An org can have multiple tribes - guild is a team formed with members from different tribes in same organization.Explain Test Plan
Test Plan contains below items.- Scope
- Describe what will be and will not be tested
- In Scope
- Below features will be tested
- Out of Scope
- Below features will not be tested
- In Scope
- Describe what will be and will not be tested
- Test Levels and Environments
- Integration testing (Sanity and Regression)
- UAT testing
- Browsers and Platforms
- Describe the browsers and platforms that will be tested.
- Desktop Browsers
- Chrome
- Firefox
- IE11
- Edge
- Safari
- Mobile Browsers
- Safari on iPhone (iOS)
- Chrome on Android (Android)
- Desktop Browsers
- Describe the browsers and platforms that will be tested.
- Tech Stack and Tools
- Language
- C#.Net
- Java
- JS
- Python
- Library
- Selenium
- Appium
- Frameworks
- NUnit
- JUnit
- Specflow
- Cucumber
- Tools and Services
- Postman
- Fiddler
- Jmeter
- Browserstack
- Language
- Risks
- Environments
- Testing deliverables
- Test plan
- requirement traceability matrix
- Bug reports
- Test metrices - pass %, Coverage
- Test summary report
Types of testing
- Functional - Testing done to validate that major features of software are working.
- Non-functional - Load testing, Compatibility testing, Localization testing and Internationalization testing, Scalability testing, Security testing, Recovery testing
Test plan vs Test strategy
Test strategy is a very high level document as compared to Test Plan. Test plan is created seperately for each project but test strategy may be created at organization level.Domain Knowledge
Superannuation
- USI - Unique Superannuation Identifier - USI replaces SPIN
- SPIN - Superannuation Product Identification number
- SFN - Superannuation Fund Numbe
Fund Types
- Corporate funds - setup by big companies for own employees
- Industry fund
- public sector fund
- Retail funds sold by banks
- SMSF - self managed super funds
- life (also known as death cover)
- total and permanent disability (TPD)
- income protection
- growth
- balanced
- conservative
- cash
- ethical
- MySuper
Regulatory bodies
- APRA - Australian Prudential Regulation Authority
- ASIC - Australian Securities and investments Commission
- SCT - Super Complaints Tribunal
- AFCA - Australian Financial Complaints Authority
- ATO - Australian Taxation Office
Insurance
- Car
- Medical Insurance
- Travel
- Life
- Home and Contents
- Income protection
Banking
- Savings account
- Term deposit account
- Current account - everyday account
- Home loan account
- Personal loan account
- Credit Cards
- Debit Cards
SQL
When to use self join
Let us say we have employee table with columns - employee id and manager id. Then we can use self joins to get all employees whose manager is ?Get the nth largest salary
You can use below query to get nth largest salary.1SELECT * FROM employee
2WHERE salary= (SELECT DISTINCT(salary)
3FROM employee ORDER BY salary LIMIT n-1,1);
Other resources
- Jenkins - https://www.youtube.com/playlist?list=PLYLI_nYYAA7J5Or23XrckHoKhJUtbleYW
- Selenium with C# - https://www.youtube.com/playlist?list=PLYLI_nYYAA7KuMuM7_RPxcCclOlzSMuk
- LeanFT Java - https://www.youtube.com/playlist?list=PLYLI_nYYAA7Je2LuJMSy4qYOPpv4K_xU
- Cucumber and selenium - https://www.youtube.com/playlist?list=PLYLI_nYYAA7IeX-yOk7h9bsNTcDLa9Pv and https://www.youtube.com/playlist?list=PLYLI_nYYAA7IuHgUG47nE_fvTTHBZZzG6
- Selenium in Java - https://www.youtube.com/playlist?list=PLYLI_nYYAA7JGxwNSbmxALvESqvx3wJ3
- UFT - https://www.youtube.com/playlist?list=PLYLI_nYYAA7IQGddKnxmPkSSdxaGFTLp and https://www.youtube.com/playlist?list=PLYLI_nYYAA7IHj6hqTRPMRMF8vOC6TGhJ
- Specflow - https://www.youtube.com/playlist?list=PLYLI_nYYAA7LxAs9KgKob6ia2z2qBMsD
- Junit - https://www.youtube.com/playlist?list=PLYLI_nYYAA7LHKwfXMPHTpc7apesyvnI
- Teamcity - https://www.youtube.com/playlist?list=PLYLI_nYYAA7L1BXG9t8pT9rJN7jTKCzF
- Linux - https://www.youtube.com/playlist?list=PLYLI_nYYAA7KXY5Nz4_stxh8_IwCF0AH
- Intellij - https://www.youtube.com/playlist?list=PLYLI_nYYAA7LINVIHFX5egHuUNwnbMcz
- Git - https://www.youtube.com/playlist?list=PLYLI_nYYAA7L2gbT91TtWUGLQT_hG-A4L
- Blogs - https://selenium-interview-questions.blogspot.com/2014/02/selenium-webdriver-basic-tutorial-in.html , https://qtp-interview-questions.blogspot.com/2014/11/learn-qtp-core-concepts.html