Skip to content
Tagged articles

unit testing

331 articles · Page 4 of 4
Programmer DD
Programmer DD
Aug 17, 2018 · Fundamentals

Who Should Write Unit Tests? Weighing Developer vs Tester Pros & Cons

This article examines the debate over who should write unit tests—developers or testers—by outlining the advantages and disadvantages of each role, explaining what unit testing is, how to design effective test cases, and offering practical guidance for implementing high‑quality automated tests.

Test Case Designdevelopersoftware testing
0 likes · 9 min read
Who Should Write Unit Tests? Weighing Developer vs Tester Pros & Cons
JD Tech
JD Tech
Jul 30, 2018 · Backend Development

Defining Units, Integration Testing Responsibilities, and the Evolution of Mock Frameworks in Java Backend Development

This article explains how to define a unit in testing, discusses who should write unit and integration tests, presents three generations of a custom Java mock framework with code examples, compares its pros and cons, and introduces EvoSuite for automatic test generation within Maven projects.

EvoSuiteintegration testingmock framework
0 likes · 16 min read
Defining Units, Integration Testing Responsibilities, and the Evolution of Mock Frameworks in Java Backend Development
Java Captain
Java Captain
Jul 22, 2018 · Fundamentals

Best Practices for Writing Clean and Maintainable Code

This article summarizes essential clean‑code practices—including commenting, naming, method design, exception handling, concurrency, unit testing, and overall code structure—to help engineers write elegant, readable, and maintainable software.

Clean CodeCode stylenaming conventions
0 likes · 10 min read
Best Practices for Writing Clean and Maintainable Code
JD Tech
JD Tech
Jun 27, 2018 · Backend Development

Introducing pmock: A Zero‑Intrusion Mock Framework for Java Unit Testing

This article presents pmock, a lightweight, zero‑learning‑cost mock framework for Java unit testing that integrates seamlessly with existing tests, explains the motivation behind unit testing, compares popular mock libraries, and details pmock’s configuration, usage, implementation, and known limitations.

mock frameworkpmocksoftware testing
0 likes · 12 min read
Introducing pmock: A Zero‑Intrusion Mock Framework for Java Unit Testing
360 Tech Engineering
360 Tech Engineering
Jun 21, 2018 · Backend Development

Unit Testing in PHP with PHPSpec: Principles, Setup, and Practical Examples

This article explains why unit testing is essential for PHP projects, introduces SOLID design principles, shows how to choose and install PHPSpec, demonstrates writing specifications, mocking, argument matching, exception testing, and configuring code‑coverage reports, all with concrete code examples.

MockingPHPSpecSOLID
0 likes · 10 min read
Unit Testing in PHP with PHPSpec: Principles, Setup, and Practical Examples
Youzan Coder
Youzan Coder
Apr 8, 2018 · Fundamentals

Testing Asynchronous Systems: Strategies and Best Practices

Testing asynchronous systems requires specialized strategies—monitoring callbacks with synchronization primitives and reliable polling with timeouts, delays, and frequencies—to handle nondeterministic execution, avoid flaky assertions, and improve testability by decoupling business logic from periodic scheduling, as demonstrated by real‑world polling implementations for Elasticsearch and MySQL/Redis jobs.

Java TestingPollingasynchronous testing
0 likes · 6 min read
Testing Asynchronous Systems: Strategies and Best Practices
MaGe Linux Operations
MaGe Linux Operations
Jan 7, 2018 · Backend Development

Why Your Python with‑Statement Fails: Debugging Global Process Locks

The article examines a flawed implementation of a global process lock using Python's with statement, explains why exceptions raised in __enter__ are not caught by __exit__, demonstrates failing unit tests, and presents three alternative solutions—including a custom ABContext, use of the deprecated contextlib.nested, and a simple if‑statement workaround—to correctly manage exceptions in context managers.

Exception HandlingPythoncontext manager
0 likes · 6 min read
Why Your Python with‑Statement Fails: Debugging Global Process Locks
Liulishuo Tech Team
Liulishuo Tech Team
Dec 15, 2017 · Frontend Development

Mastering Frontend Unit Testing: Mocha vs Jest and Practical Tips

This article explores why unit testing is essential for frontend projects, compares Mocha and Jest across assertions, coverage, environment setup, mocking, snapshots, and watch mode, and offers practical guidance on choosing tools, writing maintainable tests, and balancing coverage with development speed.

CoverageJavaScriptJest
0 likes · 19 min read
Mastering Frontend Unit Testing: Mocha vs Jest and Practical Tips
Dada Group Technology
Dada Group Technology
Dec 8, 2017 · Backend Development

Key Considerations for Large‑Scale System Refactoring: Lessons from Dada JD.com’s Double‑11 Experience

The article shares practical insights on planning, designing, developing, testing, and rolling out a large‑scale backend system refactor, emphasizing resource limits, pain points of legacy code, unit‑test protection, layering, decoupling, monitoring, and staged deployment to ensure stability during high‑traffic events.

DecouplingPerformance Monitoringbackend architecture
0 likes · 9 min read
Key Considerations for Large‑Scale System Refactoring: Lessons from Dada JD.com’s Double‑11 Experience
Liulishuo Tech Team
Liulishuo Tech Team
Oct 22, 2017 · Big Data

Data-CI: A SQL-Based Data Unit Testing Framework for ETL

The article introduces data-ci, a SQL‑driven unit testing framework that lets engineers write, organize, and automate data validation tests for ETL pipelines, providing assertions, failure callbacks, coverage reporting, and CI integration to improve data quality and reliability.

ETLSQLbig data
0 likes · 9 min read
Data-CI: A SQL-Based Data Unit Testing Framework for ETL
Tongcheng Travel Technology Center
Tongcheng Travel Technology Center
Sep 21, 2017 · Frontend Development

Understanding Unit Testing and Jest: Concepts, Types, Tools, and Best Practices

This article explains the fundamentals of unit testing, including its importance, various test types, tool categories, implementation principles, hooks, best‑practice guidelines, and introduces the Jest JavaScript testing framework with installation steps, features, and example test scripts for both synchronous and asynchronous code.

BDDJavaScriptJest
0 likes · 9 min read
Understanding Unit Testing and Jest: Concepts, Types, Tools, and Best Practices
DevOps Engineer
DevOps Engineer
Aug 10, 2017 · Fundamentals

A Comprehensive Overview of Software Testing Concepts and Methods

This article provides a detailed overview of software testing fundamentals, covering testing stages across project lifecycles, classifications such as black‑box, white‑box, and gray‑box testing, functional and performance testing, manual versus automated testing, and specialized tests like smoke, regression, random, exploratory, and security testing.

black-box testingfunctional testingintegration testing
0 likes · 10 min read
A Comprehensive Overview of Software Testing Concepts and Methods
Programmer DD
Programmer DD
Jul 30, 2017 · Backend Development

Kickstart Spring Boot: Build Your First Web Service in Minutes

This guide walks you through creating a basic Spring Boot project with Maven, adding the web starter, implementing a simple Hello World REST controller, and writing unit tests using MockMvc, providing step‑by‑step instructions, code snippets, and project structure details to help Java developers quickly get started with lightweight Spring applications.

REST APIspring-bootunit testing
0 likes · 7 min read
Kickstart Spring Boot: Build Your First Web Service in Minutes
21CTO
21CTO
Jul 26, 2017 · Fundamentals

Why Writing One Million Lines of Code Is a Myth—and How to Write Quality Code

This article debunks the myth of writing a million lines of code, explains why code quantity matters less than quality, and offers ten practical steps—including solid fundamentals, coding standards, design principles, refactoring, technical debt management, code reviews, static analysis, unit testing, self‑testing, and leveraging open source—to help developers produce high‑quality software efficiently.

Best Practicescode qualitycode review
0 likes · 10 min read
Why Writing One Million Lines of Code Is a Myth—and How to Write Quality Code
Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
Jun 15, 2017 · Frontend Development

Quickly Add Jest Snapshot Tests to Your React Project

This article explains why web releases often miss thorough testing, introduces Jest and its React support, and provides a step‑by‑step guide to implementing snapshot testing and improving unit‑test coverage in modern React applications.

JestReactsnapshot testing
0 likes · 5 min read
Quickly Add Jest Snapshot Tests to Your React Project
Tencent Cloud Developer
Tencent Cloud Developer
Jan 25, 2017 · Frontend Development

Understanding React: Component Architecture, Props, State, Lifecycle, Server‑Side Rendering, and React‑Native

Zuo Ming explains React’s component architecture—props, state, lifecycle methods, server‑side rendering, and React‑Native—using a bamboo water‑wheel analogy, demonstrating prop validation, state updates, lifecycle phases, SSR hydration, cross‑platform code reuse, and unit testing to give front‑end engineers a complete practical foundation.

Frontend DevelopmentPropsReact
0 likes · 12 min read
Understanding React: Component Architecture, Props, State, Lifecycle, Server‑Side Rendering, and React‑Native
Liulishuo Tech Team
Liulishuo Tech Team
Jan 24, 2017 · Frontend Development

Engineering Practices and Tooling for Frontend Development at Liulishuo (2016‑2017)

The article reviews Liulishuo's 2016 engineering experiments, covering their base library choices, componentization for consumer apps and internal tools, mock data generation, unit testing, error monitoring with Sentry, deployment using shipit‑deploy, and outlines goals for improving performance, testing coverage, and robustness in the coming year.

component librarydeploymenterror monitoring
0 likes · 10 min read
Engineering Practices and Tooling for Frontend Development at Liulishuo (2016‑2017)
Tencent IMWeb Frontend Team
Tencent IMWeb Frontend Team
Nov 24, 2016 · Frontend Development

Front-End Automated Testing: BDD vs TDD, Tools & Integration

This article introduces front-end automated testing, compares BDD and TDD approaches, reviews popular unit testing frameworks such as Mocha, Jasmine, and QUnit, and outlines integration testing tools like CasperJS, Nightmare, Nightwatch, and DalekJS, providing code examples and practical guidance for efficient test implementation.

integration testingtestingunit testing
0 likes · 12 min read
Front-End Automated Testing: BDD vs TDD, Tools & Integration
ITFLY8 Architecture Home
ITFLY8 Architecture Home
Nov 21, 2016 · Fundamentals

Boost Java Code Quality in Agile Projects: 5 Essential Steps & Tools

Learn how to ensure high‑quality Java code throughout agile development by standardizing coding conventions, applying static analysis, writing unit tests, implementing continuous integration, and conducting thorough code reviews and refactoring, with practical tool recommendations and best‑practice guidelines for each step.

AgileContinuous Integrationcode quality
0 likes · 20 min read
Boost Java Code Quality in Agile Projects: 5 Essential Steps & Tools
Tencent TDS Service
Tencent TDS Service
Sep 22, 2016 · Mobile Development

Master Android Unit Testing: Why It Matters and How to Do It

This article explains the importance of unit testing in Android development, outlines why developers should invest time in it, and provides a step‑by‑step guide on writing effective Android unit tests using JUnit, Mockito, Dagger2, and Robolectric, along with practical tips, CI integration, and common pitfalls.

AndroidCIDagger2
0 likes · 23 min read
Master Android Unit Testing: Why It Matters and How to Do It
Architecture Digest
Architecture Digest
Jun 6, 2016 · Backend Development

Refactoring a 3000‑Line C# Factory Class into a Concise 15‑Line Implementation

The article recounts how the author transformed a massive, repetitive three‑tier factory class in a C# data‑center management system into a clean, reflection‑based solution of just a few lines, while sharing practical refactoring lessons, pitfalls of code generators, and advice on unit‑testing and architecture design.

C++code generationrefactoring
0 likes · 17 min read
Refactoring a 3000‑Line C# Factory Class into a Concise 15‑Line Implementation
21CTO
21CTO
Apr 27, 2016 · Mobile Development

Mastering Android Unit Testing: Practical Tips, Tools, and Real-World Cases

This article shares practical experiences and best practices for Android unit testing, covering why testing matters, simple test structures, mocking with Mockito, dependency injection via Dagger2, using Robolectric, CI integration, common pitfalls, and a detailed checkout flow example.

AndroidCIDagger2
0 likes · 25 min read
Mastering Android Unit Testing: Practical Tips, Tools, and Real-World Cases
Node Underground
Node Underground
Dec 29, 2015 · Backend Development

Master Node.js Unit Testing with npm Scripts, Makefile, and CI

This guide walks through setting up Node.js unit testing using Mocha and Istanbul, streamlining commands with npm scripts and a Makefile, handling glob patterns, and integrating continuous integration with Travis CI or a custom UITest-ci solution.

Continuous IntegrationMakefileNode.js
0 likes · 7 min read
Master Node.js Unit Testing with npm Scripts, Makefile, and CI
Java High-Performance Architecture
Java High-Performance Architecture
Sep 29, 2015 · Frontend Development

Which JavaScript Libraries and Tools Do Developers Prefer? Latest Survey Results

A recent developer survey reveals the most popular JavaScript libraries, frameworks, module loaders, and unit testing tools, showing jQuery leading with 91.5% interest overall and 56.53% usage in projects, while other tools like React, AngularJS, webpack, and Mocha capture smaller but notable shares.

FrameworksJavaScriptLibraries
0 likes · 3 min read
Which JavaScript Libraries and Tools Do Developers Prefer? Latest Survey Results
Art of Distributed System Architecture Design
Art of Distributed System Architecture Design
Aug 7, 2015 · Frontend Development

How Qiniu Built a Robust Front‑End Testing Workflow with Karma, Jasmine, and Sinon

This article details Qiniu's evolution from no testing to a comprehensive front‑end testing strategy using Selenium, Karma, Jasmine, AngularJS, and Sinon, covering early challenges, unit‑test design, tool configuration, mock data handling, and the tangible benefits for code quality and maintenance.

AngularJSFrontend TestingJasmine
0 likes · 12 min read
How Qiniu Built a Robust Front‑End Testing Workflow with Karma, Jasmine, and Sinon