Skip to main content

Posts

Showing posts from 2021

Appium and android mobile app automation

Next appium and Android mobile app automation video tutoria l is live. If you are new to appium then please check - appium-tutorial This video tutorial covers - Start vysor (Just for this session and not mobile automation :)) Start appium and start appium inspector Desired Capabilities platformName - Android deviceName - L2N0219828001013 (as seen on "adb devices") Saved Capability Sets Start Session Scan app elements using appium inspector Get appPackage and appActivity using "APK info" app Install "APK info" app and open app whose appPackage and appActivity are required i.e. calculator Check top section of app icon com.android.calculator2 is app package com.android.calculator2.Calculator is app activity testng.xml file settings for running Android app tests Test details com.seleniumtests.tests.mobile.AndroidAppTest and CalculatorScreen class View beautiful STF test report  

Appium and android mobile browser automation

First Appium training video tutorial is live and covers -  Why Appium? > WebDriver for mobile devices - https://appium.io and https://www.seleniumtests.com/p/appium-tutorial.html Appium desktop app: https://github.com/appium/appium-desktop > Wrapper for Appium server  - Appium server written in node js exposes Rest API to interact with AUT  - Start Appium server  - Inspect element  - Desired Capabilities https://www.vysor.io/ > To mirror device on PC or MAC  - Enable developer mode on Android and enable USB debugging > https://www.seleniumtests.com/2015/05/set-up-android-device-to-run-appium.html adb > command line tool that lets you communicate with an emulator or android device  - Install android debug bridge https://www.seleniumtests.com/2015/05/appium-and-android-setup.html  - adb devices Execute Android Web test  - https://github.com/tarun3kumar/seleniumtests  

API Testing Part 6 - Serialization and Deserialization using REST Assured

 Next API Testing Training video is live. This session covers: Form based auth user filling out his credentials on a form given().auth().form("John", "Doe").... oAuth based authentication what is oAuth and access token?? given().auth().preemptive().oauth2(accessToken).... Object Mapping Serialization From java object to json Form Hashmap to json > com.seleniumtests.tests.api_testing.RestAPITest3#postToCreate     Deserialization 
 Ref: https://github.com/rest-assured/rest-assured/wiki/Usage

API Testing Part 5 - Authentications using REST Assured

 Next API testing video tutorial covers following topics -  How to specify auth? Basic Auth Preemptive basic auth credentials are sent before server responds with unauthorised response. reduces overhead of additional connection.  Challenged basic auth credentials are supplied only when server asks for it.                                         Ex: https://www.httpwatch.com/httpgallery/authentication/ First post request Ref: https://github.com/rest-assured/rest-assured/wiki/Usage   

API Testing Part 3 - using REST Assured

 Next API Training session video brings focus back to REST API testing. This session covers: Testing RESTful service
 using REST Assured https://github.com/rest-assured/rest-assured/wiki/GettingStarted
   REST Assured Maven dependency, 
REST Assured Includes JsonPath and XmlPath  to parse json and xml documents respectively
 API used in testing: https://reqres.in/  Operations around Get Set base URI With and without Gherkins syntax Data driven test with query, path parameters and Curly bracket notation Passing parameters between tests using extract method


Intellij IDEA Hack 2

 Next training session video of IDEA Hack is live. This session covers - Presentation assistant plugin Double shift > search any where  Search class name using first letters     Go to specific line on file i.e. filename:linenumber Searching folders i.e. /resources Recent files > cmd+E Project pane > cmd+1 Creating new file/package etc > cmd/ctrl + N Auto scroll from source Move one or multiple lines without cut and paste select + option + shift + arrow up/down Turn off presentation assistant plugin First IDEA Hack session: https://www.seleniumtests.com/2021/02/selenium-idea-hacks.html  

Java 8 part 7: Back to basics and Selenium WebDriver

This training session video covers - PECS > Producer extends Consumer super Remember Generics which provide type safety?: https://www.seleniumtests.com/p/java-training-tutorial-videos.html What are “extends”, “super” and bounded wild card? <? extends T> and <? super T> WTF ??? PECS on Jav8 > Stream examples - forEach(Consumer<? super T> action) map(Function<? super T, ? extends R> mapper) example from com.seleniumtests.tests.web.SeleniumWithJava8Session6#usingJava8

Java 8 part 6: Stream cont. and Selenium WebDriver

 Next java 8 and Selenium WebDriver training session video is live and covers - Different ways of creating Stream empty stream, stream of collection, stream of string objects, stream builder, stream generate method with limit and iterate Stream of primitives int, long and double streams using IntStream, LongStream, DoubleStream interfaces Stream of File Streams can not be reused How to eliminate expensive operations And what is parallel stream?? And some WebDriver examples  

Java 8 part 5: IntStream, sum, avg, reduce, file reading operations and SeleniumWebDriver

 Next java8 and Selenium training session video is live and covers - Method implementation on interface with java 8 - static and default methods, wtf?? IntStream.range() More Stream operations -     sum, sort, average And how do I add double numbers? Reading from file Collectors.toMap Where are the WebDriver examples??

Java 8 part 4: Optional and Selenium WebDriver

 This training session video covers - Java 8 part 4: Optional and Selenium WebDriver (yes learning Optional is not optional :)) Why Optional > What happen when data is null Optional > an object which may or may not contain non null values (some prefer to call it empty value) Do you remember where we used Optional?  :) com.seleniumtests.java8.ListExamples class > findFirst() Creating Optional using - of, ofNullable, orElse  WebDriver examples with Optional >     Testing with different data sets i.e. lower and upper case Default locale

Java 8 part 2: Stream filter operations and Selenium WebDriver

This training session video covers - List operations in java 8 Using stream with List Filter stream FindFirst Intro to method references Intermediate operations (i.e. filter, map) Terminal operation (forEach, findFirst, reduce, collect) WebDriver and list examples using java 8 What are you waiting for? Head over to training session video :)

Java 8 Intro and sneak peak into selenium using java 8

I finally started creating training video sessions on java 8 and selenium. This training session video deals with - Why is java 8 so popular? I do not "java" yet : -/ What is FunctionalInterface? Functional programming and Lambda Interface having method with no argument Interface having method with one argument What if AnimalHavingMethodArgument has two abstract methods? And what next? > Future training videos sneak peak using java 8 and selenium? What are you waiting for? Head over to training session video :) 

Intellij IDEA hacks

This training session video describes some of the Intellij IDEA hacks I use while working with selenium. This session covers - Refactor - > Encapsulate fields Refactor - rename Code generation - > Generate getter, setters, toString, equals etc. Ex Conditional Debug points Cmd + shift +a to search anything Analyze Stack trace Head over to training session video to see this in action :)  Hack 2 session is available at: https://www.seleniumtests.com/2021/02/intellij-idea-hack-2.html By the way IDEA community version is available free of cost and suffices for selenium.

How do you deal with multiple form objects in selenium

We all have come across forms containing multiple fields. My next video tutorial deals with solving this issue. Hence data object like following can be made more comprehensible and less error prone - BigUser1 bigUser1 = new BigUser1( "firstName" , "lastName" , "userName" , "address2" , "address1" , "phone1" , "phone2" , "password" , "confirmPassword" ) ; Head over to video tutorial to learn more :)

Security Testing and Selenium

I have come across many articles which talk of carrying out security testing with selenium however I found it very cumbersome to set up such tests. This is what this tutorial is going to make easy for you. My next Security Testing and Selenium YouTube video covers following - Importance of having security testing on CI What is dynamic application security testing Recommended tools from https://owasp.org/www-community/Vulnerability_Scanning_Tools What is https://owasp.org/ ?   Using https://www.zaproxy.org/    Project setup  <dependency> <groupId> org.zaproxy </groupId> <artifactId> zap-clientapi </artifactId> <version> 1.9.0 </version> </dependency> <dependency> <groupId> org.zaproxy </groupId> <artifactId> zap </artifactId> <version> 2.10.0 </version> </dependency> Start ZAP daemom (headless) mode  ./zap.sh -daemon -host 127.0.0.1 -port 8080 -config api.addrs.addr.regex=

How can you save resources when instantiaing driver?

I asked on my previous post about what was wrong in instantiating driver on set up method? And here is the solution video on my YouTube channel (After 5 years of gap I finally added new video tutorial :)) The solution described on video tutorial uses following set up - public class BaseClassOnDemandDriverSetup { private WebDriver driver ; @BeforeMethod public void setupTest () { // Any other set up goes here } @AfterMethod public void teardown () { if ( driver != null ) { driver .quit() ; } } public WebDriver getDriver () { if ( driver == null ) { WebDriverManager. chromedriver ().setup() ; driver = new ChromeDriver() ; } return driver ; } }