You are here

Tutorials

Mentoring Mastery - Passing on Skills You "Just Do"

Regardless of whether or not you have any "direct reports" in your organisation you may well find yourself responsible for mentoring other colleagues on testing techniques. The problem is - how do you teach skills that have become second nature for yourself. We're often so busy focusing on improving our testing that we don't develop techniques and soft skills for passing on those learnings to junior testers, non-testing colleagues or new starters.

We want you to leave this tutorial with confidence that you can successfully mentor colleagues and a number of techniques to facilitate your mentoring, such as:

  • Where's my motivation: it's not just film star divas that need to find their motivation before acting out a scene.
  • Learning will always be more successful if a mentee is motivated, and to be brutally honest there are some aspects of testing (actually some aspects of any discipline) that are dull and not in any way motivating.
  • Don't feed the mentee: It is all too easy to fall into the trap of providing answers or simply telling a mentee about a topic, unfortunately humans are very bad at retaining that kind of information and we will demonstrate this with a quick game that you can take back to work with you.
  • Imitate, Assimilate & Innovate: Our mentees will go through various stages of learning and our mentoring will need to change tack accordingly. Using role play techniques we will encourage you to frame the subject matter appropriately to maximise learning potential.
  • Role reversal: Encouraging the good grace needed when your mentee succeeds and becomes more knowledgeable than you in a subject area - time to start mentoring them on mentoring.

 

We will use a combination of role play, games and written exercises to work through these learnings. Activities will be varied to work with the variety of learning styles that humans display.

Takeaways:

  • Improved empathy in dealing with challenging situations
  • Discovery of, and immersion in, different learning styles (seeing/hearing/reading/doing)
  • Practice of practical communication skills that work in fast-paced and agile environments
  • Use of clean language to explore the underlying situation behind a mentees request for help
  • Finding and maintaining common ground for a 2-way mentor-mentee relationship

Selenium Testing from Scratch

This tutorial is aimed at getting you started with Selenium testing and goes through all the concepts from scratch, to get you from ‘no Selenium knowledge’ to ‘now i can test my site’. I will go over the following topics: setting up Selenium in your project, enabling browsers for testing on them, using CSS selectors to identify the WebElements you will use in your tests, and the actual page interactions. These include: reading page properties, interacting with the page, navigating through pages, working with Cookies, using waits for having reliable tests, just to name a few. The tutorial will focus on Selenium testing using Java and it will include testing on a real site, just as you would do in your day to day work.

Takeaways:

  • Learning Selenium starting with the basics and covering a wide range of topics that testers need for doing their daily work
  • Setting up the browsers you want to test, according to your operating system and requirements
  • Using CSS selectors to identify the WebElements to use in your tests Page interactions: reading WebElement attributes, interacting with the page by clicking on items or typing in the fields
  • Reading, deleting or setting cookie values Navigating through site pages
  • Using WebDriverWaits to have reliable tests that wait for page events before doing anything else
  • Plus other bonus features
  • Participants will also receive the tutorial support documentation to take with them at thome and practice some more

Efficient Selenium Infrastructure with Selenoid

Selenoid is an alternative lightning fast open-source Selenium protocol implementation running browsers and Android emulators inside Docker containers. It is distributed with a set of ready-to-use Docker images corresponding to the majority of popular browser versions, has a one-command installation utility and works slightly more efficiently than traditional Selenium Grid.

This tutorial shows how to build efficient and scalable browser automation infrastructure using Selenoid and related tools. You will be taught why running browsers in containers is so efficient, how to easily install Selenoid and use its powerful features.

Tutorial covers

  • Selenium:
    • 10 mins of theory Brief Selenium history
    • Current WebDriver architecture
    • how Selenoid works and it motivation
  • Selenoid installation for tests development
    • What is required to start Selenoid
    • Manual installation: creating config file, pulling browser images, starting Selenoid Shorter way: fully automated installation via CM tool Selenoid UI installation and features
  • Basic Selenoid features:
    • Custom screen resolution
    • Looking at live browser screen Recording and downloading video
    • Custom test name
    • Updating browsers
  • Selenium clusters theory
    • Why Selenium Grid is not suitable
    • Client-side load balancing
    • Server-side load-balancing
  • How to share state
    • Session ID magic
  • Ggr server
    • How it works
    • Setting up Ggr - Creating users file
    • Creating quota file
    • Starting Ggr
    • Running tests against Ggr
  • Cluster Maintenance
    • Changing available browsers with no downtime
    • Adding users with no downtime
    • How to deal with multiple quota files
    • Proxying to external commercial Selenium services
    • Proxying video, logs, downloaded files
    • Adding more Ggr instances
    • Health checking instances
  • Ggr UI
    • How it works
    • Setting up and linking with Selenoid UI
    • Advanced Selenoid features for big clusters
  • Advanced browsers configuration file fields
    • Volumes
    • Environment variables
    • Tmpfs
    • Hosts entries
    • ShmSize
  • Sending logs to centralized logs storage
    • Why?
    • Centralized logging storages
    • How to configure Selenoid to send logs
  • Sending statistics to centralized metrics storage /status API
    • Configuring Telegraf to upload statistics
    • Creating statistics dashboard with Grafana
  • Sending logs to centralized logs storage (ELK-stack)
    • What is ELK stack
    • Configuring Selenoid to send logs to ELK-stack
    • Searching across logs
  • Building custom browser images
    • What's inside browser image
    • Ready to use browser images
    • How to build custom image
  • Selenoid for Windows browsers
    • How it works without Docker
    • Difference in configuration file
    • How to run multiple isolated sessions under Windows

 

Takeaways:

  • Why Selenium should always be run in Docker containers How to forget about Selenium issues with Selenoid
  • How to efficiently scale Selenium cluster to easily have thousands of browsers running in parallel
  • Where to take ready to use browser images How to use powerful browser tests debugging features in Selenoid

Building Your Own Api Testing Framework with Pytest and Requests

APIs lend themselves extremely well to test automation. There's a simple reason for this: APIs are designed to be consumed by computers, not by people. So where with UI tests, you need to rely on testing-specific libraries such as Selenium WebDriver, with API testing you can simply use the same libraries as the ones that are used to build applications. This also means that building an API testing framework is significantly easier than building one for UI testing. So why let's not just do that in a tutorial?

You'll be able to experience how easy it is - assuming you have some very basic general programming knowledge and know what an API is. We'll build our framework using Python, Pytest and the requests library. More importantly, we'll explore and discuss what your framework needs to be able to do to support the full life cycle of a test suite. Because I see all too often a focus on how easy it is to build tests and little mention of maintainability or readability of test results.

After this tutorial you'll have a basic API testing framework you can extend (I will be giving tips for next steps). More importantly you'll have a better understanding of testing frameworks in general. And that will come in handy when you have to evaluate a testing tool, or when you are discussing a framework with the developers that build it.

Takeaways

  • How to make your framework support the full life cycle of a test suite (inc. menomonic)
  • Basic programming skills applied to Python, pytest and the requests library
  • Inspiration to build their own tests and frameworks through programming

Improving Testing through Operability

Reliability, handling failure gracefully and recovering quickly are becoming increasingly important as the software development world adopts DevOps culture and practices. Outages and security failures are big news and many companies are investing heavily to avoid these challenges. Operable systems are easy to deploy and test, provide actionable information about their state and behave more predictably in adverse conditions.

Testers on development teams are often used to testing changes to the functionality of an application but less so testing how operable a system is. My recent experience has seen testers on teams charged with improving operability for systems through better logging, monitoring and system control measures (such as feature flags) to emit better information. This information on system stability and state is critical to testing and we can influence its creation profoundly.   

Why it is important for testers

  • As the operability of systems becomes a greater focus, testers need to be equipped with models to think about how to add value in this context.
  • As testers, we strive to add value and testing for reliability enables us to use our risk analysis skills to explore for failures and how to recover.
  • If we get involved with helping our system to emit better information from an operability standpoint, testability through observability and control will likely be enhanced.
  • Rather than having shallow status checks, testers can contribute to meaningful monitoring of customer journeys and how reliability and recovery are measured.

 

Takeaways:

  • Recognise the key terminology pertaining to logging, monitoring and system control measures and their role in operability.
  • Understand how to test systems for the quality of operational information that they emit and how this can help improve information gained through testing.
  • Apply the understanding of operational insights to improve testing of functionality and system control measures (such as healthcheck, config change, system status change endpoints and feature flagging) to enhance overall operability.

Android Application Security Testing

As of September 2017, the Google Play store holds 3.3 million applications.  In May 2017 Google announced that there are over 2 billion monthly active Android devices. These devices are a gateway to our entire lives- our contacts, communications, entertainment and finances. Every application installed on a mobile device is placed into an ecosystem where all of this information is stored and constantly exchanged and accessed by the user and other parties. And just like every other piece of software written by humans, Android applications contain vulnerabilities. These vulnerabilities can be exploited by attackers, placing users and publishers of applications at risk.

What we will do:The workshop will be a combination of lectures, demos and hands on exercises, during which you will be given access to virtualized Android devices with pre- installed applications designed to showcase specific vulnerabilities.

  • We will conduct assessments on the applications, the devices and on
  • network traffic to discover the vulnerabilities present in the apps
  • We will assess the threats posed by the vulnerabilities
  • Since no security assessment is complete without writing a Proof-of-Concept attack, we will exploit every vulnerability that we find during our assess-ments

 

We will use the following techniques to conduct our assessments:

  • De-assembling applications into human readable dalvik opcodes (smali)
  • Generating Java-like code from Android apk files
  • Reverse engineering application logic, modifying and re-compiling Android applications
  • Modifying Android application logic during run-time
  • Analyzing, intercepting and modifying Android application network traffic

 

Takeaways:

After completing the workshop you will have a basic understanding of how to conduct an Android application assessment. The outcome will be a healthy paranoia, which will make you think twice before installing any application from the Play Store in the future. At the very least, you will become conscious of permissions requested by Android applications and how dangerous they may be.

Prerequisites:

This will be a technical, hands-on workshop, which means, that participants are required to bring their own laptop. Previous programming and command line experience may make your overall experience smoother, but all concepts, techniques and tools will be explained from A to Z. In conclusion - all you really need is a laptop and motivation!

Subscribe to Tutorials