E2E Testing With Cypress on Jenkins With Parallel Pipeline Stages

In this tutorial for JavaScript end-to-end testing, you will learn about Cypress test runner for UI automation testing and how to use it with the Jenkins CI server. Cypress helps with frontend automation testing using a headless browser or just a regular browser. E2E tests often take a long time to run and for bigger projects, those types of tests can take dozens of minutes or even hours. To save developers time you want to load balancing Cypress tests across Jenkins parallel pipeline stages. Thanks to that, you can run your 1-hour test suite in a few minutes.

How to Speed Up Cypress Tests

Cypress is a Javascript End to End testing framework that has built-in parallelisation but in this article, we will cover Cypress parallel without dashboard service. You want to be able to run tests also when the external Cypress dashboard service API is down. It’s possible thanks to the Knapsack Pro client for Cypress with built-in Fallback Mode.

Development Efficiency and Measurement

Seeing and improving the efficiency of Software Development teams is a problem for every technical team manager. There are two important points here:

  1. Awareness: How well is the team doing?
  2. Improvement: How does the team get better?

You Can’t Improve Without Measuring

Before attempting to change something, determining exactly where it is located is the most important step. Productivity is not only to complete a lot of task or to write more codes, but to produce high-performance, error-free products in a production environment and write simple and maintainable codes and to provide a sustainable development environment.

How to Run GitLab CI Pipeline With Parallel RSpec Tests in Ruby

GitLab CI allows you to run tests much faster thanks to its CI parallelization feature. You can run parallel jobs across multiple GitLab Runners. In order to do it, you will learn how to split tests in a dynamic way across parallel tasks to ensure there is no bottleneck in GitLab Pipeline. Thanks to that CI build can be run as fast as possible so your Ruby and JS tests can be finely fast.

GitLab CI Parallelization

The common problem when you want to run tests in parallel to complete your one-hour test suite in a few minutes instead of waiting hours is to find a way to split tests on parallel jobs. Some of your Ruby or JavaScript tests can take milliseconds and some even a few minutes per test file (for instance, when using Capybara in RSpec features testing). The problem with slow tests also occurs in E2E (end to end testing) when using Cypress test runner as browser testing can take quite a long time to execute.

Pipenv and Requests Author Kenneth Reitz Interview

Introduction

Kenneth Reitz is a well-known software engineer, international keynote speaker, and open-source advocate who also focuses on photography and music production. He is well known for his many open-source projects, specifically Requests "simple, yet elegant HTTP library" and Pipenv Python Development Workflow for Humans. We are excited to have interviewed Kenneth! In this interview, he talks about the top issues Python developers face while scaling applications, shares his thoughts on async / await paradigm in Python, speaks about his project PyTheory, and the "natural affinity" for software development.

The Interview

Evrone: Alongside all your Python contributions you also have several music albums and thousands of great professional photos. What is your main interest right now?

Shifting Left: A Penetration Tester’s Journey to the Code Analysis Camp

Most of you know me as an offensive security gal. The fact that I decided to join a SAST team frankly surprised me, as well. Now that I have officially started my job at ShiftLeft, I am taking this moment to reflect on how I got here and how I see the future of application security.

Confessions of a Newbie Web Developer

I started my career as a web developer. And I absolutely loved it! I loved building tools that solve someone else’s problems. And there is no feeling like seeing your vision materialize right in front of your eyes.

Value Stream Management: The Next Evolution in Software Development

Software delivery is complex. I think most of us can agree with that statement. Yet, regardless of how confusing it is, it’s a vital core competency for all organizations, despite what industry they are in or what product they are building. Today, every organization finds itself needing to be a software company. But simply being a software company isn’t enough – they need to be a high-performing one.

Today’s CIOs constantly have this on their mind, as they are instructed to create more business value with fewer resources. But unfortunately, in many cases, the pursuit of higher productivity in software delivery results in well-intentioned initiatives that fall short of their goals.

Fast CI Build Time With Parallel Jobs on Semaphore CI for RSpec, Cypress, and Jest Tests

Semaphore CI 2.0 allows for configuring your CI build task with parallel jobs. This way, you can run simultaneously a few different commands that do not depend on each other. But we could also use parallel jobs to split your test suite across a few jobs and save time this way. I will show you how to speed up your CI build for your Ruby or JavaScript project (Rails/Node project).

With Semaphore CI 2.0, you don’t pay for a reserved amount of containers that can be run in parallel as in some other CI providers. Instead, they count the amount of work time spent on running containers. This creates an incentive to run more parallel jobs to execute our tests fast and still keep bill at a similar level as if we would just run all tests in single container waisting our own time.

What Is Chaos Engineering?

In the past, software systems ran in highly controlled environments on-premise and managed by an army of sysadmins. Today, migration to the cloud is relentless; the stage has completely shifted. Systems are no longer monolithic and localized; they depend on many globalized uncoupled systems working in unison, often in the form of ethereal microservices.

It is no surprise that Site Reliability Engineers have risen to prominence in the last decade. Modern IT infrastructure requires robust systems thinking and reliability engineering to keep the show on the road. Downtime is not an option. A 2020 ITIC Cost of Downtime survey indicated that 98% of organizations said that a single hour of downtime costs more than $150,000. 88% showed that 60 minutes of downtime costs their business more than $300,000. And 40% of enterprises reported that one hour of downtime costs their organizations $1 million to more than $5 million.

3 Reasons to Win the Testing Trophy

In 2015, London was shaken to its foundation by Bloomberg’s software failure that affected over 300,000 traders worldwide. The same year, the Royal Bank of Scotland paid a £56 million fine because of a software glitch that had blocked their clients’ access to the bank’s services. In 2017, British Airways had to cancel over 1,000 flights due to a major IT breakdown. And perhaps coffee lovers from the US and Canada can recall the day when Starbucks ended up giving out coffee for free because its system refused to process payments.

The above examples show that one can’t underestimate the importance of software testing. Properly conducted tests reduce your stress levels and save you money, regardless of whether we are talking about e-commerce, finance, transportation, or even a coffee shop business.

How to Check if an IP Address is a Bot in Java

An IP address is a unique numerical identifier that is assigned to each network-connected device that uses the Internet Protocol for communication; simply put, this includes most devices we use today (i.e. laptops, smartphones, tablets, etc.). For business websites, verifying user IP addresses can provide valuable insight into client-specific demographics, allowing them to effectively target their content.

However, not all IP addresses are valid – some can be a bot, botnet, or other non-user entity that can either skew your data or potentially cause harm to your business or clients. This article will explore a free solution that can check if a single IP address is a bot in Java by leveraging real-time signals against known high-probability bots. While there are some useful bots out there, such as chatbots and search engine bots, we want to ensure that there are no “bad” bots lurking in an IP address that could pose a threat.

Scan an AWS S3 File for Viruses in Java

The increased use of cloud storage is also increasing the attention it gets from potential cyber attackers. End-users are able to upload viruses, and attackers can craft specialized attack malware and upload this content as well. Once these threats are uploaded, they can flow through your systems, hiding themselves in cloud storage or databases, and could eventually get executed.

Consider the following situation: an attacker uploads a custom executable file into a financial company’s cloud storage database, and the system accepts it. The virus is missed by the company’s minimal virus scan software, so it continues to infiltrate other critical business applications. Eventually, it’s downloaded by a financial manager, resulting in an endpoint being infected with an Advanced Persistent Threat (APT).

MapLibre Launches as Official Open Source Successor to Mapbox GL JS

In December, Mapbox shocked its open source contributor community with the news that Mapbox GL JS version 2.0 would be released under a proprietary license. The JavaScript library powers interactive, customizable vector maps on many high profile websites like CNN, The New York Times, Ancestry, Strava, Shopify, Facebook, and more. Older versions remain open source but Mapbox will only be investing in developing new features for the proprietary version going forward.

Multiple parties started their own forks immediately following Mapbox’s announcement. In an effort to avoid fragmentation, the community worked together to merge their ideas under one project. One month later, MapLibre GL is now the official open source successor to Mapbox GL JS. The project’s founders represent a diverse group of companies who relied on the open source software, including MapTiler, Elastic, StadiaMaps, Microsoft, Ceres Imaging, WhereGroup, Jawg, Stamen Design, and more.

“In December 2020, Mapbox released the second version of their JavaScript library for publishing maps online,” MapTiler founder and CEO Petr Pridal said. “However, this time all the new features were overshadowed by a change in the license: previously free as in freedom, it became closed for external contributors and usage was restricted to people with active Mapbox subscriptions. One has to pay even for loading this JavaScript library.”

Pridal said the MapLibre project name is a shortened form of “Map library restarted (or reinvented),” with libre referring to freedom and independence. Its founders agreed that MapLibre should be provider-independent, so developers can load maps from their preferred providers or self-hosted maps.

The community-led fork may also become home to MapLibre GL Native, as contributors are considering a proposal to put MapTiler’s open source fork of Mapbox’s mobile map SDKs for Android and iOS under the MapLibre umbrella.

Mapbox is used by WordPress.com as well as in Jetpack for the Map block. The library is also used in many plugins on WordPress.org, some with tens of thousands of users. Plugin developers who have integrated Mapbox GL JS version 1.13 or older will want to check out the MapLibre project as an open source alternative to Mapbox’s proprietary 2.0 update.

How to Scrape E-Commerce Data With Node.js and Puppeteer

Web scraping is nothing new. However, the technologies that are used to build websites are constantly developing. Hence, the techniques that have to be used to scrape a website have to adapt.

Why Node.js?

A lot of websites use front-end frameworks like React, Vue.js, Angular, etc., which load the content (or parts of the content) after the initial DOM is loaded. This especially applies to performance-optimized e-commerce websites, where price and production information are loaded asynchronously.

Testing Your Code on Terraform: Terratest

Infrastructure as Code (IAC) is more than just a paradigm. Developers are now able to deploy the code they have written on a capable cloud infrastructure without having to configure the cloud environment and provision resources manually. With the help of frameworks like Terraform, deploying supporting cloud infrastructure is as easy as writing a few lines of code.

As with other code constructing the app, however, infrastructure code can have faults and may cause errors. The need for improved testing—including testing the resulting infrastructure itself—is growing rapidly. For the longest time, developers relied on manual testing for the ‘solution’—but that comes with its own set of inherent problems: it’s time-consuming, inefficient, and error prone. Terratest mitigates many of the issues in manual testing.

Test-Driving Kotlin in ZK

Every now and then it's time to learn something new — especially for a software developer. Be it just to keep in touch with recent developments, to challenge yourself by getting out of your comfort zone, or to widen your perspective and get fresh ideas on something you already know.

Very often, this means trying out the latest framework or a new platform. Sometimes, you work on an existing project and several decisions are already set in stone.

Handling RxJava Observables in a Web UI

Before we dive into the meat of this article, let's start with some definitions.

RxJava: A Java VM implementation of Reactive Extensions: a library for composing asynchronous and event-based programs by using observable sequences. It is popular, as it addresses the concerns about low-level threading, synchronization, thread-safety and concurrent data structures.

A Multi-Theme System, the Decade-Long Wait for Grandchild Themes, and Themeless Templates

Around 2010, child theming had finally caught its stride. Bigger theme shops were starting to take note, and some were implementing advanced parent themes that were meant to serve as a “framework” for creating child themes. The theme development community hit a bit of a brick wall amid this explosion of child theming. Grandchild themes became a topic of debate.

One of the use cases for child themes was to protect customizations made by end-users. When the parent theme was updated, those changes remained intact within the child theme. Users could get bug fixes and enhancements without worry. It was an ingenious system.

However, another use case for child themes was to create vast customizations of the parent theme. Many of these child themes were marketed and sold to end-users. The problem? There was no way for users to protect their customizations if and when the developer updated the child theme. WordPress had no grandchild theme concept or any other sort of cascading theme system beyond the parent-child relationship.

So, the problem remained. Unsolved.

Some businesses such as StudioPress and its Genesis parent theme thrived over the years with this system. Others moved along. In reality, child theming became a niche feature that WordPress never expanded upon in any meaningful way. Theme authors were left to their own devices. With the arrival of the customizer and the expansion of page builders, code customizations almost disappeared. Most modifications were handled via an interface launched from the WordPress admin. The average user had little need to DIY their way through custom templates. Thus began child theming’s drizzle into near obscurity.

Gutenberg’s site editor, which will likely land in WordPress this year, had seemed to be the upcoming final blow to the child theming paradigm. Everyone from developers to end-users will be able to roll out custom templates directly from the WordPress admin.

However, should we be rethinking the role of a hierarchical theming system?

Full Site Editing is already introducing an extra level to the hierarchy. Traditionally, WordPress theming had a two-tier template hierarchy. In the future, it will add a tier for user-created templates. If that is possible, why not go ahead and throw in grandchild themes? Or, simply do away with such arbitrary limitations altogether?

Carlo Manfredi introduced a pull request to the Gutenberg repository that essentially creates a multi-theme system. Or, rather, it created a multi-theme templating system. Aside from the style.css, functions.php, and theme.json files, block-based themes are essentially a collection of templates.

Manfredi is proposing that users should be able to opt into this multi-template system. They would have the option to keep templates from an old theme around when they switch to a new one. While not currently implemented in the pull request, he also proposes allowing users to clone templates from their old theme.

“In recent months, there have been whispers around the future possibility of multiple themes being active, templates being ‘themeless,’ etc.,” wrote Manfredi in the ticket. “This branch is an implementation of that. The idea behind this implementation is there can only be one active theme at a time, but the wp_theme taxonomy can be used to link up individual templates / template parts with one or more themes at a time.”

It does not fulfill the dreams of a decade-old grandchild theme system. However, it could provide some precedent for exploring a full hierarchical theme system.

With the simplification and further standardization of how themes work, we should be dusting off old ideas and shoving them into a new light.

Full Site Editing will eventually solve the grandchild theme problem regardless of whether it had intended to. With the new tier of custom user templates, the upgradability problem created years ago will simply disappear. Users will be able to readily update their parent and child themes without fear of losing customizations. WordPress will safely store their custom templates in the database. It will even keep their design changes via the Global Styles system. Maybe, just maybe, child themes will begin to reach their initial height of popularity.

With Manfredi’s proposed system, users could mix and match templates from unrelated themes. If this happens, it begs the question of whether theme templates are even necessary.

Last year, Rich Tabor opened a discussion on the possibility of a single master theme for WordPress. In that system, WordPress would create a set of base templates. Theme authors could simply override the pieces that they wanted. They could even pare themes down to simple style.css and theme.json files.

That almost seems to be a recipe for bland and boring themes. However, if you couple it with a template directory on WordPress.org similar to what GutenbergHub has already introduced, users could pick and choose the templates they want. It could be both wondrous and disastrous, but I would not mind exploring the idea.

WordPress and its Gutenberg project have a lot of options on the table. Theme building could become interesting in the next year or two.