ci-stat is based on circleci_stat developed in Python. The target is to provide a programming lib to fetch test artifacts and analyze the data from both public cloud CI as Travis, Circle and on-premises CI services as Bamboo, Jenkins.

Snip Screen

Read more »

After baseline v1.2 of Cucumber-Java-Toy, we already created a red-green-refactor TDD cycle, the next step is to migrate the whole automation test to docker and utilize dockerhub, CircleCI to create a DevOps cycle.

DevOps

It is still in progress by Jan30. Keeping updated.

Read more »

When I worked on a wireless basestation project, there is an IPL layer to configure and manage uboot, uboot to configure and manage build images, image starts HAL, the HAL calls WatchCat, WatchCat wathes soft WatchDog, then the watchdog propagate Apps which talks via USL (Universal Software Layer). Now AWS runs in an eco as well. There are plenty of Cats and Dogs which can prepare, configure, watch(monitor) even take care your services, containers, apps, or, hosts.

This post summarizes the eco services as Ansible, Datadog, CircleCI, Terraform and draws a list for further self-study.

Read more »

Chinese New Year Greeting

Happy Chinese Sprint Festival and wish you a good fortune in new Rooster Year! Here is antithetical couplet(对联) for this new Rooster Year, just inspired by dynamic programming language and serverless view points this morning.

Following up, there is the sample code to play Chat Robot in WeChat, the most popular online chat service of Chinese. It is a sample to demo how to use chat lib and how to use substitution in UTF-8 cprint format strings.

Read more »

Recently took a short test task on a blog prototype, here are notes about tips on applying JUnit into Testing, especially Web Testing. As a new comer to advanced JUnit features, this post is also a track of learning. The current topics include tips about using @Rule, customize test strategy, to parameterize test, hints on Java Lambda, JUnit 5 new features, et.

Structure and Test Pyramid

Chart drafted with sketchboard.io

Read more »

About PageObjects

The "PageObjects" are introduced mainly to avoid duplicated codes in test and simplify the maintenance works as well. PageObject just models the WebUI under test and represent the state transition among UI(page) activities.

PageObjects and Page Factory Pattern are terms from Selenium documents. The concepts of PageObject and (w/ or w/o) Page Factory are also derived from general OOD. It could be regarded as a much simplified ORM or a simple DAO if we regard test cases as data, test scenario pattern as DB tables. So the methodology can apply to other tests besides web.

  • PageObject is a pattern of design
  • Selenium Java package provides a basic support on lazy init. However, it is still a wheel to build for specific test area.

A rough mapping could describe the concept easilier:

Traditional App Dev terms Web Automation Test Concepts
DB drivers like mysql-connector Web Drivers (take JSON call and get results from browser process)
DB Abstract as JDBC Selenium 2(it bridge the API to JSON calls)
ORM as peewee or SQLAlchemy to ensure DB agnostic PageObject provides agnostic on selectors and page details

Based on project experiences, PageObjects offers below three functions to automation:

Traditional App Dev terms Selenium PageObject Sections
DB Table Structure as create, alter operations Web Elements Encapsulation as lazy init, multiple selectors, and, retries
Select/View A snapshot of state Pages define the states of sceanrio
Transaction Procedure Functional methods provides interaction on pages, some of them triggers state transition, either return a new object of page or change the internal states

It can be utilized to design test suppport classes for database, CLI (especially tree view cli), interactive shell and desktop applications. The key is to design abstract objects to represent the internal relationships between states and adjunct methods to fetch/operate the POI(points of interests, I borrowed this concept from MapSys design).

Therefore, the PageObjects here formed a layer to separate test logics and supporting objects. When people are drafting tests, we don't need to switch to OOD part to spend time "thinking" about how to implement it and finally find out we forget the original motivation or target to do. This makes a concentration.

PageObjects Pattern or Bot Style Test?

it's not always a pattern that teams feel comfortable following.

Alternatively there is Bot Style in test and test automation. Following PageObjects style, one turns to draw a state transition map on paper or in mind, no matter it is automation or manual test. For Bot Stylte, the test is designed against action steps (user scenarios). It is not to see which style is "better" in a quick glance. Here I am trying to provide some tips on finding the correct technique within the project characters and constrains. Usualy no matter in manual or automation, Bot Style is the first technique to utilize at beginning to get more domain knowledge while doing sanity test. Bot Style focus on the encapsulation of interactive actions so it is consistent to the test description on test plan or user manual.

Read more »

Cheers! Toy project baselined to v1.2 and all pending issues resolved.

https://github.com/maxwu/cucumber-java-toy

Github Link

Brief

The target of this demo project is to show and refresh a general approach of BDD and experience the Gherkin specs as a communication tool on story definition and how to map it to JUnit case scope. It started on Monday from scratch and baselined Friday morning on schedule. Crtitial issues resolved were recorded on Github issue board, too. I recorded hints and tips in the readme markdown page. Here is a paper of note about the thoughts captured during the fast adaption phase.

There is another post about tips on PageObject design in web testing. This post is on general practice with Gherkin spec and JUnit.

Read more »