560 blogs tracked7,114 posts indexed

#testing

42 posts · 19 companies · newest first

Curated view of this subject:Topic: Testing205
1

Freeze And Resume Network Calls In Cypress (opens on the source site)

Often our tests need to confirm that while the application is loading its data, the web page shows specific information. For example, while the app is using GET /fruit network call to fetch the name of the fruit, the page shows "loading..." text. We can slow down the network call using cy.intercept command and confirm the loading text 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 it('shows the loading element', () => { // delay the network call for 2 seconds cy.intercept('GET', '/fruit', () => Cypress.Promise.delay(2000), ).as('loadFruit') cy.visit('/') // confirm the…

productstestingexcerpt only · body stays at the source
From the web
3

On reviewing AI-generated code (opens on the source site)

I see a lot of posts from developers who insist on reviewing every single line of code that AI agents write. I understand the approach, because that’s what we, including me, have been doing for years. However, it doesn’t scale and most developers admit it. I don’t think it’s the right answer to AI-generated code. An agent produces code much faster than anybody can read it. Human review doesn’t get better when there is more to read, quite the opposite.

aiagentsexcerpt only · body stays at the source
From the web
5

Branded Phone Type (opens on the source site)

In my previous blog post Branded Types I have shown a useful technique for representing time durations as "branded types" which removes the confusion between seconds and milliseconds. 1 2 3 4 // value is in seconds const duration = 1 // oops, I thought the duration was in milliseconds cy.wait(duration) Let me show an other example: representing user phone numbers using branded types. This solves a common problem in end-to-end tests where the system has to verify the user to avoid scammers: 1 2 3 4 // are these numbers the same? const phoneNumber1 = '+1 (123) 456-7890' const phoneNumber2 =…

processtestingexcerpt only · body stays at the source
From the web
6

The Regression Tests Nobody Writes: Capturing How Software Actually Behaves (opens on the source site)

Here’s an awkward question for any codebase that’s been around a few years. Do your tests describe what the system does? Or what somebody, at some point, thought it should do? Not the same thing. Not even close, usually. Most regression tests get written right alongside a feature, by people writing down their intentions. This function returns that. This endpoint rejects bad input. Perfectly good tests! But give a system a few years in production and it picks up a whole extra layer of behavior that nobody planned and nobody wrote down. Quirks. Weird edge cases. A default value someone picked…

running-softwarecontributedexcerpt only · body stays at the source
From the web
7

Write End-to-End Tests in Your Backend’s Language (opens on the source site)

The browser is often the easiest part of an end-to-end test. Consider a test that verifies a user can complete an overdue task. The visible interaction is small: sign in, find the task, click Complete, and observe the new status. Before any of that can happen, the test needs a workspace, a user, a project, and […] The post Write End-to-End Tests in Your Backend’s Language appeared first on Atomic Spin.

exploratory-testingtestingexcerpt only · body stays at the source
From the web
11

curl performance (opens on the source site)

tldr: the live version is here: https://curl.se/perf/ How fast is “fast” and is it good enough? Does it run as fast now as it did before or was there a regression? What exactly needs to be fast? How fast is it? These are questions that many projects and products face, and in curl we are … Continue reading curl performance →

curl-and-libcurlperformanceexcerpt only · body stays at the source
From the web
14

Now testing: Best comments first (opens on the source site)

You might see a new option to sort comments on web, in addition to chronological sorting options: Best comments first. We want to make it easier to find interesting conversation, and demote spammy comments. Look for this option in the comments view on any post, only on web for now. We’re still testing and fine-tuning how this works, so your feedback is welcome — leave it below!

testingtumblr-engineeringexcerpt only · body stays at the source
From the web
18

Test Auto-healing Is A Red Flag (opens on the source site)

Well, I am happy to report Cypress-the-company is all in on test auto-healing in its new cy.prompt command (which I recreated locally as cypress-think plugin). Let's look at the screenshots Cypress put in the blog post: The test shows Cypress auto-healing in practice. The test had a prompt like "Turn on dark mode", which used to resolve to some button (unclear). Now the button is gone, but the test has been "auto-healed" to find another button. We can see the details of the healing by clicking on the "Turn on dark mode" step in the Command Log: Please do not use any auto-healing in your…

processtestingexcerpt only · body stays at the source
From the web
19

Has It Not Happened Yet (opens on the source site)

Do not confuse negative assertion with a quick timeout. Let me get back to the testing of negative states one more time. Recently, I have read a pretty good blog post How to test that cache works with Cypress by Walmyr. A piece of Cypress test syntax caught my eye: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 cy.search(randomWord).then(() => { expect(count, `network calls to fetch ${randomWord}`).to.equal( 1, ) cy.wait('@random') cy.search(randomWord).then(() => { expect( count, `network calls to fetch ${randomWord}`, ).to.equal(1) }) }) The test above confirms that the web page caches the search…

productstestingexcerpt only · body stays at the source
From the web
21

Why Gherkin Is the Right Testing Tool for RPG Migration — And It Has Nothing to Do With BDD (opens on the source site)

Everyone benchmarks RPG migration test suites on coverage. That's the wrong metric — the real deliverable is behavioral equivalence a non-programmer will sign off on, and Gherkin is the only format the people who actually know the rules can read. The post Why Gherkin Is the Right Testing Tool for RPG Migration — And It Has Nothing to Do With BDD appeared first on Strumenta.

legacy-modernizationrpgexcerpt only · body stays at the source
From the web
22

Testing Java Memory Management with Chronicle-FIX using AI (opens on the source site)

While I am sceptical of using AI for release code, it has plenty of uses that previously weren’t practical, such as determining how easy your software is to use. If an AI can “figure it out” with a few hints, then you are on the right track. For me, the value of AI is what you learn using it. For more Techincal Information on Chronicle-FIX What AI Does Well and What It Doesn’t Claude and Codex are effective for producing idiomatic code; for low-latency code, it needs a significant body of example code. In this case, it was able to utilise sample code for benchmarks. If it was being used to…

aibenchmarksexcerpt only · body stays at the source
From the web
24

CakePHP Fixture Factories 2.0 (opens on the source site)

A clean v2 API is coming dereuromark/cakephp-fixture-factories just shipped 2.0.0 RC. After a year of incremental cleanup — typed persistEntity() / persistEntities(), the TEntity template on BaseFactory, redirected deprecations — the next major was the right moment to redesign the surface coherently rather than keep layering. This post walks through the why, the what, and the how […]

cakephpfixture-factoriesexcerpt only · body stays at the source
From the web
25

Making Our Frontend Unit Tests Much Faster with @swc/jest (opens on the source site)

We were annoyed with the slow performance of our frontend unit tests, so we made them much faster! It turned out that swapping out the test runner is an easy and efficient way to keep the migration effort low, while reaping the benefits of much faster execution times.

frontendjavascriptexcerpt only · body stays at the source
From the web
26

Testing A11y Using Cypress And wick-a11y Plugin (opens on the source site)

I have a little web app called Gametime I use to keep track of players during youth soccer matches. Recently I decided to add a11y testing to ensure the text is readable, inputs have labels, etc. Since I already had Cypress end-to-end tests covering all features of the app, I just needed 60 seconds to ensure the web app is accessible to everyone. Install the wick-a11y plugin First, let's install wick-a11y plugin. 1 2 $ npm i -D wick-a11y [email protected] Register the plugin's tasks in the Cypress config file cypress.config.mjs1 2 3 4 5 6 7 8 9 10 import { defineConfig } from 'cypress' //…

productstestingexcerpt only · body stays at the source
From the web
27

String Types For E2E Tests (opens on the source site)

Every individual item sold on Mercari.com has an id that looks like m<number>. The item's id is visible in the URL, for example www.mercari.com/us/item/m73702188949/. If you buy several items from the same seller, you get a discount because you buy it as a bundle. Every bundle has its own unique id that looks like b<number>. Both ids are strings, yet they have a certain format that differs. In our tests we don't want to be confused which type we are passing: is it an item id; a bundle id; a random string we pass as id by mistake? Here is where TypeScript string template literal types come in…

processtestingexcerpt only · body stays at the source
From the web
28

AI-Powered Playwright: Building a Self-Healing CI/CD Testing Pipeline (opens on the source site)

Test automation has always been a field that requires a lot of work. Quality assurance teams were often stuck in a cycle of fixing broken tests, maintaining scripts by hand, and updating locators in a way that wasn't reliable. As software release processes got shorter, this old way of doing

aitestingexcerpt only · body stays at the source
From the web
29

Testing Readonly Models (opens on the source site)

I was working with a readonly model in Rails the other day and ran into an issue whilst testing it. Here's what I ran into and the solution I came up with. Readonly models are a great way to signal that, well, you should only ever read them, not write them. Maybe you have some external system that connects to the database for writes, or maybe your Rails app connects to some data warehouse for some queries or reports. It's can be useful to have a safeguard to prevent accidental errant writes. It's actually really simple to make a model readonly, you just need to override the readonly? method:…

testingruby-on-railsexcerpt only · body stays at the source
From the web
30

Migrating From Cypress.env To cy.env and Cypress.expose Methods (opens on the source site)

Cypress v15.10.0 has announced a big switch coming in v16 - the new way of dealing with environment values and secrets. Let's see why this change is necessary, what is means for your testing code, and what the best practices for handling secrets in your tests should be. First, let me say: Cypress end-to-end browser tests run in the browser. This is different from Playwright and different from how other test runners execute tests. When you run cypress open or cypress run, the Cypress Electron-based binary starts the Node process, launches the browser, loads the e2e spec into the browser, and…

productstestingexcerpt only · body stays at the source
From the web
32

Branded Types (opens on the source site)

Let's say you need to specify a timeout or wait in your end-to-end Cypress tests. You would use milliseconds 1 2 3 4 // try finding the "selector" elements for up to 1 second cy.get('selector', { timeout: 1_000 }) // then wait for 5 seconds .wait(5_000) For clarity, you could write a helper to convert seconds into milliseconds 1 2 3 4 const seconds = (n) => n * 1000 cy.get('selector', { timeout: seconds(1) }) .wait(seconds(5)) What happens if you accidentally forget the seconds(...) call? You still get a spec that passes your linter 1 2 3 4 5 const seconds = (n) => n * 1000 // oops, GET has a…

processtestingexcerpt only · body stays at the source
From the web
33

Verify Then Control The Data (opens on the source site)

Imagine we are testing a web page that receives two numbers from the server and then shows their sum In the Command Log you can see the two GET /random-digit calls the web page makes to the server. The server responds with {n: ...} JSON object. The page should add these two numbers and show the correct sum How would you test this page? I see 4 different approaches 🎓 This blog post is based on the lessons from my Cypress Network Testing Exercises course. Compute the data in the test The simplest approach we can take is to look up the numbers shown on the page and compute the expected sum…

processtestingexcerpt only · body stays at the source
From the web
34

Automating Exhaustive Branch Coverage for Sealed Types in Kotlin (opens on the source site)

We take code correctness and code quality seriously at Wealthfront. One of the most effective ways we ensure that our code is correct is through rigorous unit testing and strong typing. In Kotlin, sealed classes and sealed interfaces offer a powerful tool to model restricted class hierarchies. They provide strong guarantees about the types in... Read more

wealthfront-engineeringandroidexcerpt only · body stays at the source
From the web
35

A Fast Bytecode VM for Arithmetic: The Virtual Machine (opens on the source site)

In this series of posts, we write a fast bytecode compiler and a virtual machine for arithmetic in Haskell. We explore the following topics: Parsing arithmetic expressions to Abstract Syntax Trees (ASTs). Unit testing for our parser. Interpreting ASTs. Compiling ASTs to bytecode. Disassembling and decompiling bytecode. Unit testing for our compiler. Property-based testing for our compiler. Efficiently executing bytecode in a virtual machine (VM). Unit testing and property-based testing for our VM. Benchmarking our code to see how the different passes perform. All the while keeping an eye on…

interpretersvirtual-machinesexcerpt only · body stays at the source
From the web
37

Hands-On Career: The Evolution of a Java Champion (opens on the source site)

Table of Contents Introduction Superhuman Intelligence Is Already Here ATMs Didn’t Replace Bank Tellers About Me Multidimensional Growth Areas of Career Development Scope of Consideration Roles Where All Areas Are Important The Range of a Founder’s Role How Will AI Change Development? How You Ask the Question Changes the Result Some key terms in understanding how Generative AI works Estimating the Value of AI-Generated Documentation AI and the Reverse Baltimore Phenomenon The Baltimore Phenomenon The Reverse Baltimore Phenomenon Filling a void Brainstorming Ideas Sample Project 2048 Using…

aiopinionexcerpt only · body stays at the source
From the web
38

Prompt Engineering for AIDE (opens on the source site)

This article was AI-generated using this project as context. AIDE Project. The purpose of this project is to see how much an AI could generate given enough context, and in this project, all the "source" code is generated using the requirements and unit tests as context. This follows the Next-Level Development: Harnessing AI with AIDE approach. The main parts are: Requirements Documents in .adoc format. JUnit tests in Java. AIDE itself. AI-generated code in Java. Even the articles written about AIDE are part of the context for the AI. This article is about how to write requirements as a prompt…

exerciseinfoexcerpt only · body stays at the source
From the web
39

Next-Level Development: Harnessing AI with AIDE (opens on the source site)

If it’s worth doing by hand, it’s worth automating. Just because not everyone is (yet) a world-class developer; that doesn’t mean we can’t step closer to that expert-level space. In this post, I will introduce AIDE (Artifical Intelligence Development Environment), a powerful workflow that merges AI-driven code generation with a sharp focus on documentation-driven development. With AIDE, I tap into the best of artificial intelligence (AI) while respecting the real human insight needed for domain-specific logic. The result? An environment that streamlines repetitive coding, synchronises…

opinionperformanceexcerpt only · body stays at the source
From the web
40

Accelerating AWS Native Development with LocalStack & Docker: A Real-World Case Study (opens on the source site)

In this blog post, I’ll walk through how using LocalStack with Docker and Docker Compose helped us speed up development and testing, making the entire process more efficient and seamless. When building modern cloud-native applications on AWS, having a reliable and cost-effective approach to development and testing is essential. For this project, we utilised LocalStack, a platform that simulates AWS services locally. This enabled us to work more efficiently, speed up development, cut down on costs, and quickly test integrations without constantly interacting with the actual AWS cloud.…

awscloudexcerpt only · body stays at the source
From the web
41

Use Cases for AI (opens on the source site)

Use Cases for Generative AI For the past year, almost every week the Software Engineering world is asked about Artificial Intelligence (AI). “What should Capgemini’s AI offerings be?”, “Aren’t you worried about the role of Capgemini software engineers now that AI can write code?” Specifically in these cases, the questions are around Generative AI. To put that in context, here is a recap of some terms used to describe different implementations of AI. Machine Learning A nice dictionary definition of machine learning from Oxford Languages is: “the use and development of computer systems that are…

aimachine-learningexcerpt only · body stays at the source
From the web
42

JSON Parsing from Scratch in Haskell (opens on the source site)

JSON is probably the most used standard file format for storing and transmitting data on the Internet in recent times. Though it was historically derived from JavaScript, it is a programming language independent format and is now supported by almost all languages. JSON has a simple syntax specification with only four scalar data types and two composite data types. So, writing a parser for JSON is a great exercise for learning the basics of parsing. Let’s write one from scratch in Haskell.

parsersjsonexcerpt only · body stays at the source
From the web
42 shown

Privacy choices

Reading never requires analytics. These choices last 90 days on this browser.

Essential sign-in and security storage always stays on. Read the privacy notice.