Posts

capycon - New Ruby GEM for Running Capybara on Console

Testing is enjoyable if you are using the right tools and technologies, of-course you also need to understand the philosophy behind the testing. I generally use testing tools interactively to try different options that the tool you are using gives as alternatives. For Selenium and Capybara, I have scripts to run get to get them ready on my console, you can read more this post for Windows and this for Unix-like. Under the quarantine days, I wanted to create a Ruby GEM for any want to get Capybara experience on the console for their project. 


Capycon is simple, the short version of Capybara-Console, a GEM file so you can install it by:
gem install capycon
To use it, open your terminal and switch irb or pry and then require the capycon, then you use all the functionality of the Capybara on the console. See the following steps;
~/P/p/c/capy_con (master ⚡→☡) pry [1] pry(main)>[2] pry(main)>require"capycon"****************************************** capycon -CAPYB…

(Framework) API Test automation with Ruby Rspec and Airborne

Image
Automated tests for API and services are very important so there are lots of solutions for API test automation in the market. These solutions can be commercial-off-the-shelf (COT) or opensource libraries also, there are many frameworks created around these opensource libraries. Testing APIs with tools that have IDE can be easy to start and learn but it can be challenging to customize for your unique problems or integration to CI/CD tools can be hard. Therefore I can suggest you use one of the opensource libraries by implementing it with your favorite language. In this way, it can run faster,  easily extendable, and configurable.  I have created a framework with Airborne and Rspec for automating API tests, you can check it from Github.  In this post, I want to explain what is Airborne and how I implemented a framework around it. You can simply update the environment variables and write your specs file in the `specs` folder. 

What is API Testing API stands for an application…

TestOps: What is it and Why we need it

Image
Years of experiences in the software industry shows that there are many more thing that has not been discovered yet. Every approach found in the software industry aims to accelerate the development speed with more customer satisfaction.  Hence the new term "TestOps" is also creating different perspectives on the relationship between test activities to the operational activities within the DevOps culture. In the post, I want to explain my experience with the TestOps.  What is TestOpsIt shortly stands for tests and operations. Within the DevOps culture, it is a sub-discipline DevOps. There are two approaches to TestOps, these are related to the test approach that you are applying the overall test approach. Mainly if you are applying `shift-left testing` then the TestOps should be adopted to have more collaboration with the development team, `TestOps shift-right`. On the other hand, if you are applying `shift-right testing` then the TestOps should be adopted to have more collabo…

GitHub Actions: CI / CD Tools - Applying for Ruby / Rspec Project

Image
Github released the beta version of "actions" last year for creating a CI/CD pipeline for the projects. This feature enables us to create a pipeline easily with the web interface of the Github.  I want to run the tests for one of my public project in the Github before merging branches to the master. For testsozluk aka "test dictionary", which contains terms frequently used in the software industry with the meaning and usage of them in Turkish. For the project, tests are critical because JSON files in the Github project are the data source of the application so if any corruption in the data may break the android and the ios application. The tests in the project are written in Ruby by using Rspec to assert them so I used the Github actions to verify before merging code. In this post, I want to explain how this can be done.
Github's actions are very easy to apply. You can add it just go to the Actions tab in your project and then select one of the predefined option…

Automated Performance Testing with K6

Image
Automated testing is running the tests and reporting results by tools with scripts. Automated performance testing is designing the performance test scenarios to run them spontaneously by tools and evaluating the result by tools to decide to go or not to go further.
Automated Performance Testing is A subset of the performance test scenariosDesigned to run spontaneously by toolsDesigned to evaluate the result by toolsDesigned not to break the systemHaving decision metrics, ex: max response time, max-average resp time, ...Designed to create reports for the concurrent and historical run What Types of Performance Testing Should be Automated
Automated performance testing can be applied to all types of performance testing. However, each type needs a different level of maturity and sanity. Automated Performance Testing is Easily applied to load testing Hard to apply stress test, spike test, but have benefits Very hard to apply Soak-Endurance test Automated Load TestsSince the load test is aiming t…

Basics about Performance Testing Tools

Image
I had an opportunity to give a speech about how we can automate performance testing in CI/CD pipeline in a conference held in Istanbul for the first time "Test automation and Digital QA Submit Istanbul, #TAS19". My subject was "Automated Performance Testing", the first part of the speech is to explain what is performance tests and the second part is to explain performance tools, and the last section is to explain what is automated performance testing and how to implement it to CI/CD. 
In this post, I want to explain my thoughts about the basics of performance testing tools. Next posts will focus on automated performance testing and using K6 as a performance testing tool.

How to Evaluate Performance Testing ToolsBefore diving into the performance testing tools and technologies we have in the industry, we should define the criteria for evaluation. Each tool has its own advantages or disadvantages and similarity between ancestors or others. When we start to use the tool…

Performance Testing

Image
I had an opportunity to give a speech about how we can automate performance testing in CI/CD pipeline in a conference held in Istanbul for the first time "Test automation and Digital QA Submit Istanbul, #TAS19". My subject was "Automated Performance Testing", the first part of the speech is to explain what is performance tests. 
In this post, I want to explain my thoughts about performance testing. Next posts will focus on automated performance testing and using K6 as a performance testing tool. What is Performance Testing By DefinitionDefining the performance of the system by testing the functionalities of the system in terms of the non-functionalities


Performance Testing is A non-functional testingTesting the functionalities of the systemBoth black-box and white-box testingDefining how the system works under any loadsApplied under different load levelsApplied under different load incrementsApplied under different durationsWhat is Performance Testing in Terms of Proce…

Getting the text of elements in Espresso

Image
Espresso is not designed to play with UI objects. When you are considering it in terms of capability for testing, it needs to be improved more. It is not as mature as Android SDK itself so you need to customize somethings to handle your requirements. Even you may need to use other tools like UIAutomator integrated into your test suite.
In this post, I want to show how we can handle getting the text of ViewInteraction view. 
ViewInteraction view does not have .text function for getting the text of the object since it is designed to interact with the object. Another method which may solve the problem of the assertion is to use the .check for matching the text, as follows:


However, this method is not a good way to assert that a certain field text equals a value. For this purpose, we need to get the text of the element and assert it. To get the text of the ViewInteraction element, we need to cast it to TextView with getting the assignable form of it then extract the text that the view ho…

How to Set Shared Preferences in Espresso Test for Kotlin and Java

Image
I have experienced Espresso and needed to deep dive into Shared Preferences
just because it is one of the main parameters used in the application we developed. As a long search in the online sources but there are some pretty old documents for Espresso with Java and very few documents about Espresso with Kotlin. In this post, I want to share my experiences with setting Shared Preferences with Kotlin and Java and how you can use it in your test design. You can follow up the steps for your test project.
Shared Preferences is a way to store user data in local devices so it has been supported since the very early version of Android. Shared Preferences can be stored in the default file or custom file. 
Using Default File for Shared PreferencesIf your application uses the default file it should stores the shared data in the default file provide by Android as in the following path in the device:
/data/data/com.package.name/shared_prefs/com.package.name_preferences.xmlThis is the source code for…