This tutorial demonstrates multiple techniques for turning a Java String into a String[] array—including the basic split() method, a regular‑expression split, Guava utilities, and a concise Groovy approach—while providing complete code examples and output verification.
Grails 4.0.5 has been released, introducing new features such as enhanced REST API configuration, plugin.groovy loading, performance optimizations, and updates to Micronaut, Spring, SpringBoot, and GORM Datastore, along with improved documentation and resolved issues.
The article explains a puzzling bug where a Groovy‑created object's toString becomes empty after fastjson serialization, traces the issue to Java access modifiers, demonstrates the problem with sample code and console output, and resolves it by adding a public modifier.
After completing a DOM‑based XML parsing class, I tackled the messy Zookeeper configuration hierarchy for MySQL services, exposing unexpected node structures, missing values, and hundreds of database settings, and finally crafted a Groovy script that traverses the XML, filters relevant keys, and logs the extracted configuration details.
This article walks through building a Groovy utility to parse Zookeeper XML configuration files—covering parsing methods, choosing DOM for small files, implementing a reusable XMLUtil class, and demonstrating the tool with sample code and console output screenshots.
This article introduces a Groovy‑based Verify utility that overloads arithmetic and comparison operators to simplify JsonPath response validation, eliminating manual type conversions and enabling expressive syntax for front‑end test cases.
This guide explains why IntelliJ IDEA often misreports Groovy syntax, shows the three ways to access object properties, demonstrates generic method definitions, and clarifies the behavior of the 'it' keyword in nested loops, providing concrete code examples and practical work‑arounds.
This article extends the previous JsonPath utility guide by demonstrating how to write comprehensive Groovy‑based Spock unit tests, covering Maven/Gradle setup, basic and data‑driven demos, detailed test cases for JSON path extraction, array operations, statistical functions, and a deliberately introduced bug with its console output.
This article walks through the creation of a Groovy‑compatible JsonPath utility library, explaining its design, key methods for extracting various data types, a custom verification helper, and how to test it later with the Spock framework.
The article explains how to use Groovy's operator‑overloading features to create a JSONPath‑style verification DSL, detailing which operators are implemented, the challenges with sign‑conversion operators, and providing a full example class with logging for each overloaded operator.
The Metadata Center, built by Alibaba Entertainment, streamlines development by offering a searchable Data Source Plaza and a configurable Custom Interface engine that abstracts service calls, adds unified monitoring and circuit‑breaker safeguards, and leverages optimized scripting, cutting upfront coding effort and accelerating feature delivery across Youku applications.
This guide walks you through connecting IntelliJ IDEA to a database, using its built‑in POJO generators, adding JPA modules, and creating custom Groovy scripts to produce fully annotated JPA entity classes, complete with getters, setters, and utility methods.
The article provides a step‑by‑step tutorial on configuring database connections in IntelliJ IDEA, using its built‑in tools to generate simple POJOs or JPA‑annotated entities, and creating a custom Groovy script to produce fully annotated Java entity classes directly from a database schema.
This guide explains how to create a globally unique, auto‑incrementing variable in JMeter by using a synchronized Groovy script that leverages the built‑in props object, demonstrates setting an initial value, and compares locked versus unlocked execution results.
The author shares a series of JMeter demos that leverage Groovy for context access, variable handling, command execution, request manipulation, regex extraction, cookie and header processing, and throughput error analysis, while recommending thorough documentation review and community interaction to deepen JMeter expertise.
The article explains how to isolate and measure the time spent on request signature generation in an API performance test using micro‑benchmarks, provides Java and Groovy code examples, and discusses subtracting non‑request overhead to obtain calibrated throughput.
The author shares a first‑hand account of a newly launched backend project, explaining how strict coding standards, Groovy‑Java mixed development, and a pragmatic testing strategy—including limited unit testing, interface checks, and annotation‑based validation—enabled rapid bug resolution and a smooth release.
In this technical diary I walk through three real‑world problems I hit while integrating MyBatis SQL fragments, debugging Groovy constant class compatibility, and crafting a reliable Bash startup script for Java services, sharing the root causes, error messages, and step‑by‑step fixes.
This article demonstrates how to list fail‑list files on Linux, extract user names via shell string trimming, capture the output in a Jenkins pipeline, convert it into a Groovy array, and send individualized email notifications with the corresponding files attached.
Apache Groovy versions 2.5.12 and 3.0.4 have been released, with 3.0.4 as the maintenance release for the 3_0_X branch, offering 45 bugfixes and enhancements—including new slurper path support, Stream toArray(Class) extension, updated dependencies, and documentation improvements.
This article introduces a video tutorial series on using the Moco API mock framework, focusing on how to configure request matching (URL, parameters, headers, cookies) and provides a comprehensive set of Java response‑handler utilities for functional and performance testing.
This article introduces the Groovy‑based Spock framework and the Mockito mocking library, shows how to configure them together in Gradle, and provides detailed Groovy demo code illustrating various mocking, spying, verification, and exception‑handling techniques for robust Java unit testing.
This article demonstrates how to use Groovy scripts within JMeter’s JSR223 pre‑processor to generate RSA‑based signatures for request parameters, providing a complete utility class, configuration steps, sample code, and console output to verify that the signature is correctly added to the request.
This article introduces Groovy closures, explaining their definition, implicit 'it' parameter, custom arguments, return behavior, and demonstrates how to assign, invoke, and pass closures to methods such as each() and findAll() for list processing, accompanied by practical code examples.
This article provides a curated collection of Groovy tutorials covering topics such as Java‑Groovy integration, stream‑based prime calculation, shell scripting, database operations with Gradle, Groovy Shell usage, operator overloading, JMeter scripting, regular expressions, tuples, lists, and advanced Gradle‑Groovy techniques.
This article introduces the powerful nGrinder load‑testing tool, explains its architecture and advantages over JMeter, walks through controller and agent deployment, script creation, data preparation, TPS control, parameterization, test execution, result analysis, and advanced features for building a stable, scalable distributed performance‑testing environment.
This article walks through the challenges of load‑testing a phone‑binding feature that swaps between two number prefixes while preserving the original UID‑derived number, detailing validation rules, a configurable solution, test design, and the full Groovy‑based load‑test script.
This article demonstrates how to use Groovy scripts within JMeter's JSR223 pre‑processor to generate RSA signatures for request parameters, covering key handling, encryption, decryption, signing, verification, map conversion, and how to attach the signature to the HTTP sampler for automated performance testing.
This article compiles a series of frequent Jenkins pipeline problems—such as Git parameter handling, credential plaintext usage, Sonar scanning, JSON parsing, HTTP request handling, and build termination—and provides practical solutions, code snippets, and tips to help developers avoid pitfalls and streamline their CI/CD workflows.
This tutorial shows how to convert a Java class that filters names into concise Groovy scripts, demonstrates Groovy list literals, index access, and built‑in collection methods like each, any, every, find, and findAll, providing complete code examples.
This article compiles a series of real-world Jenkins pipeline problems—ranging from Git parameter handling and credential usage to Sonar scanning, JSON parsing, and pipeline control—offering concise solutions and code snippets to help DevOps engineers avoid common pitfalls and streamline their CI/CD workflows.
This article compares Java’s null, which throws NullPointerException on member access, with Groovy’s NullObject that safely handles method calls, explains the underlying implementation, demonstrates practical code examples, and shows how to customize NullObject behavior via metaClass extensions.
The article shares a series of JMeter demos that leverage Groovy for accessing the test context, retrieving SampleResult and previous sampler data, discusses the limited usefulness of thread scheduling via Groovy, highlights a discovered throughput discrepancy, and provides practical advice and links to related technical resources.
This article explains how to implement and run Groovy‑based test scripts that verify a multi‑project single sign‑on scenario where the same account can stay logged in on both web and pad without being kicked out, and password changes do not invalidate the other session.
This article compiles a series of JMeter tutorials and presents a detailed, code‑driven walkthrough for using Groovy to add, read, and modify HTTP headers via the HeaderManager and JSR223 pre‑processor, complete with screenshots and sample console output.
This article presents a curated list of technical resources covering Java, Groovy, and Python, including tutorials on concurrency, memory management, regular expressions, scripting, and performance optimization, each linked to detailed explanations and code examples.
This article provides a comprehensive tutorial on handling HTTP cookies in JMeter using Groovy scripts, covering the creation and configuration of CookieManager, adding and modifying cookies, executing JSR223 pre‑processors, and interpreting console output, supplemented with code examples and screenshots.
This curated collection presents dozens of Chinese-language articles covering Java, Groovy, and Python topics such as concurrency, performance optimization, regular expressions, JMeter scripting, and algorithmic challenges, providing links to in-depth tutorials and code examples for developers seeking to deepen their programming expertise.
This article demonstrates how to apply Groovy regular expressions within JMeter to extract fields from API responses, showing step‑by‑step configuration of a thread group, JSR223 post‑processor script, and variable handling for performance testing.
This tutorial demonstrates how a simple Java Hello World class can be progressively transformed into idiomatic Groovy code, covering eight evolution stages that introduce Groovy’s syntax shortcuts, GString interpolation, dynamic typing, and script‑style execution while preserving the original program logic.
This guide explains how to install and configure Jenkins' Email Extension plugin, set up SMTP settings, create a shared library Groovy script for email notifications, and test the email functionality within a Jenkins pipeline.
This article explains Groovy's immutable Tuple classes, shows how to create and use Tuple, Tuple2, Tuple3, and demonstrates their read‑only behavior with practical code examples, highlighting why they are ideal for returning multiple values from methods.
This article explains how regular expressions can be applied in Java and Groovy to extract information from JSON and HTML responses during web crawling, provides a reusable Java Regex utility class, demonstrates Groovy-specific regex operators, and shows sample code and console output.
This guide demonstrates how to add a JSR223 PostProcessor with Groovy in Apache JMeter to capture slow requests, write request parameters and responses to a log file, and control pagination for automated performance testing, providing complete script examples and console output.
This tutorial explains how to employ Groovy scripts within JMeter to dynamically modify request parameters, covering setup of a thread group, adding a JSR223 PreProcessor, example code, console output verification, and result tree inspection for GET and POST requests.
This article demonstrates how to execute operating‑system commands from a Groovy script inside JMeter’s JSR223 PreProcessor, showing the required test plan setup, the Groovy code, and the resulting console output for performance testing purposes.
This tutorial walks through using Groovy code to set up Docker Cloud in Jenkins, detailing class imports, parameter maps, template creation, cloud configuration, and an alternative JNLP‑based example for advanced container launch strategies.
This tutorial shows how to use Groovy scripts inside JMeter to set and retrieve both thread‑local (private) and thread‑shared (global) variables, providing step‑by‑step configuration, code snippets, and sample console output for each case.
This article demonstrates how to use Jenkins Core API and Job DSL in a Groovy Jenkinsfile to programmatically create, update, and manage Jenkins jobs and folders, including handling security approvals and template project configuration.
This article presents a complete Jenkinsfile that defines choice parameters for selecting an environment and dynamically populates a server list using Groovy scripts, then demonstrates a simple pipeline stage that validates and echoes the chosen values, aborting the build if validation fails.
The article explains that shared libraries, a familiar concept from languages like Python, are implemented in Jenkins as Groovy classes containing methods, helping to centralize pipeline code, avoid bloated Jenkinsfiles, and improve maintainability, while also promoting a live broadcast and group chat.
This guide explains how to deploy Nexus with Docker, define component concepts, configure Maven settings, and use Jenkins pipelines—both script‑based and Nexus plugin—to upload and publish artifacts to Nexus and Artifactory, including API scripts and naming conventions for repository management.
The article explains the concept of shared libraries, compares them to Python modules, describes how Jenkins Groovy shared libraries store classes and methods, and discusses their role in simplifying and standardizing pipeline code to avoid overly complex Jenkinsfiles.
The article explains the concept of shared libraries, compares them to Python modules, describes how Jenkins uses Groovy classes for reusable pipeline code, and highlights their role in simplifying and standardizing Jenkinsfile management while also promoting an upcoming live event.
This article explains how to replace cumbersome Python‑Plotly visualizations of performance test logs with a lightweight Groovy solution that generates plain‑text bar charts directly in the shell or email, using Unicode block characters and a bucket‑based median algorithm.
This guide introduces Jenkinsfile pipeline development utilities, covering a snippet generator, declarative syntax generator, essential global variables, and frequently used pipeline methods such as JSON handling, credential usage, source checkout, HTML reporting, interactive input, build user identification, and HTTP requests.
This tutorial explains how to configure Jenkins shared libraries, create Groovy utility classes, and integrate them into pipelines, covering library structure, code examples, required plugins, and usage within Jenkinsfiles to enhance DevOps workflows.
The article demonstrates how to perform business‑level validation of a resource's like/unlike API during performance testing, including Java methods for the operations, a Groovy load‑testing script, and explanations of error handling within the testing framework.
This guide explains how to automate Jenkins project creation at scale by using the Job DSL plugin to generate DSL scripts, converting them to XML via a Playground tool, and creating or updating jobs through the Jenkins Core API or Script Console, with full code examples.
This article demonstrates Groovy's operator overloading capabilities through Java-compatible code examples, including arithmetic, shift, and increment operators, shows console output, integrates a performance‑testing thread multiplication demo, and highlights Groovy's ability to overload even the dot operator.
This article demonstrates how to design a reusable Java test case that can serve functional verification, automated validation, and performance benchmarking of backend APIs, providing a complete demo with source code, test scripts, and execution guidelines.
This article outlines essential Jenkins Pipeline best practices, including using the official Pipeline plugin, treating pipelines as code, organizing work into stages and nodes, leveraging parallel execution, handling inputs with timeouts, and preferring stash over archive for artifact management.
This guide demonstrates how to use several Jenkins Pipeline plugins—including readJSON, withCredentials, checkout, publishHTML, input, BuildUser, and httpRequest—to handle JSON data, manage credentials, retrieve source code, publish HTML reports, interactively collect input, obtain build user information, and perform HTTP requests within a CI/CD workflow.
This article explains how to write Jenkinsfiles using Groovy syntax, demonstrating that beyond the built‑in DSL methods provided by Jenkins plugins, native Groovy can be employed for data manipulation and flow control, illustrated with multiple screenshot examples.
This article compares Gradle and Maven, explains Gradle's advantages for large Java projects, introduces Groovy's benefits, walks through a complete build.gradle example, covers closures, dependency configurations, the Gradle wrapper, and essential tasks, providing practical code snippets and usage tips.
This guide explains how to configure Artifactory in Jenkins, set up server credentials, and use both a Jenkins Shared Library and a Jenkinsfile to automatically publish build artifacts to Artifactory as part of a CI/CD pipeline.
This guide explains how to build an automated interface‑testing pipeline using Jenkins, Ant, JMeter and Groovy, generate test reports, filter out false‑positive failures caused by network or environment issues, let users confirm them in Jenkins, and recalculate success, failure and false‑positive rates.
This article introduces Groovy Shell, explains how to launch it, demonstrates basic commands, variable handling, closures, Windows-specific tips, arithmetic with BigInteger, and showcases its usefulness for rapid prototyping and testing in backend development.
The article explains why many developers avoid unit testing despite its importance, demonstrates a Java method for filtering unpromised tools in a home‑renovation app, provides complete JUnit and Groovy/Spock test implementations, and shows how richer output from Groovy/Spock can speed debugging.
This article demonstrates how to extend basic Spock usage by applying Groovy‑based helper methods, data‑driven testing, and advanced language features within a mixed Java‑Groovy project, while also addressing common pitfalls and providing complete example code.
This article explains how Groovy, combined with Gradle, can serve as a native application server to synchronize environment‑specific property files with a MySQL registry, demonstrating practical build‑script configuration, file‑system traversal, and Groovy‑SQL database operations for robust CI/CD workflows.
This article introduces the versatile Spock testing framework, explains why it’s favored for Groovy projects despite compatibility quirks, and provides a collection of runnable demo specs that showcase Spock’s expressive syntax, data‑driven testing, and detailed reporting.
This article provides a comprehensive tutorial on using Jenkins Pipeline environment variables, covering how to list, read, set, override, store boolean values, and capture shell command output, complete with practical Groovy code examples for CI/CD workflows.
Jenkins pipelines, defined as Groovy code, enable version‑controlled, reusable CI/CD jobs for complex multi‑service environments, simplifying repetitive tasks such as URL updates, providing change tracking, and automating builds, tests, and releases across branches via Jenkinsfile.
This article explains how to integrate Jenkins with GitLab by using the HTTP Request plugin to send API calls, configure pipeline steps, and provides sample Groovy code and a summary of common GitLab API endpoints for operations such as project, branch, tag, and pipeline management.
This article explains how to build a Java wrapper that loads and runs Groovy test scripts at runtime, covering classloader nuances, reflection-like execution, file discovery, method filtering, and provides a complete code example for a custom test framework.
This article explains how to use a Groovy script to crawl over 7 million historical weather entries for 3,200 cities spanning 2011‑2019, process the JSON responses, and store the cleaned data into a MySQL table, while sharing practical tips and code snippets.
The article presents a Java/Groovy script that crawls a website offering curated e‑books, extracts book details such as title, author, and download links using HTTP requests and regular expressions, and then inserts the collected information into a MySQL database.
This article explains how to write a Groovy script for a CI pipeline that lists webapp directories on a Linux server, keeps the newest four, sorts them by modification time, and deletes the older ones using sudo to overcome permission issues, complete with full source code.
This article demonstrates a Java‑based web crawler written in Groovy that uses regular‑expression parsing to retrieve paginated company data from a government portal, constructs SQL insert statements, and stores the results in MySQL, with full source code and structural screenshots.
The article explains how the project login system was upgraded to Single Sign-On (SSO), details two performance testing scenarios for single‑user logins, and provides Groovy and Java code examples for concurrent testing, token handling, and CAS credential verification.
This article explains how to define, fetch, and process unit test metrics such as failCount, skipCount, and totalCount from Jenkins build logs using the Jenkins JSON API and a Groovy Jenkinsfile script.
Based on Dice Insights’ analysis of TIOBE, RedMonk and internal hiring data, this article highlights five programming languages—Swift, Kotlin, Python, Groovy, and TypeScript—that are expected to experience rapid growth in the coming years, explaining the reasons behind each trend.
This tutorial shows how to use the Moco API framework with a concise Groovy script—just five lines of code—to set up a mock server that serves a static blog, covering server configuration, URL redirection, mounting of static resources, and a simple wait loop for termination.
This tutorial shows how to package a Java‑based HTTP testing framework into a JAR, import it into Groovy, and write a concise Groovy script that sends an HTTP GET request, processes the JSON response, and prints the result.
The author encountered a "cannot find symbol" error when Java and Groovy code called each other, which worked locally but broke on Jenkins and Gradle builds, and solved it by renaming the file to .groovy and adding the Groovy plugin so Groovy compiles before Java.
This article explains why the default Moco example fails to extract JSON parameters from POST requests, walks through the source inspection that reveals the limitation, and provides a custom JsonExtractor implementation with Groovy helper methods to correctly match JSON payloads.
This guide explains how to transition from Gradle to Maven for a Java‑Groovy mixed project, covering folder renaming, essential Maven dependencies and plugins, manifest configuration, and a note on optional local‑jar settings to successfully build an executable JAR in IntelliJ.
The article describes a Java performance testing framework that was refactored from a request‑based to a method‑based design, introducing a ThreadBase class and specialized adapters for HTTP requests, database queries, and concurrent execution, and discusses the advantages of code‑based concurrency and Groovy.
The article explains two approaches for flexible performance testing on a head‑only Linux server—one using configuration files to assemble requests and another using Groovy scripts—detailing code implementations, command‑line execution, and deployment steps.
This article presents a Groovy‑driven, modular API testing framework that automates login, token handling, and password‑change requests using multithreaded execution, and includes full source code for the test driver, UserCenter, and OkayBase classes.
This article presents a Groovy‑based modular framework for automating complex, interrelated API tests, detailing how to structure test modules, manage user credentials and tokens, and execute concurrent requests using custom thread handling, with full source code examples for the main driver, UserCenter, and base classes.
This article explains how to build a Groovy‑driven, modular API testing framework that logs in, obtains a token, and programmatically changes a user's password while handling concurrency and response validation.
This article explains how to create a custom CycleHandle response handler for the Moco framework, providing full Java source code and Groovy usage examples to enable cyclic responses in scenarios such as order submission or resource deletion.
When using Moco API for interface virtualization, the default extractor cannot handle POST requests with JSON bodies, so a custom JsonExtractor is created to read the request content, parse the JSON, and return the desired parameter value.
This article introduces a lightweight Groovy TimeWatch utility that lets developers record execution times with customizable markers, offering both millisecond and nanosecond precision, and explains its implementation, usage, and future multithreading considerations.
This article explains how to create a custom CycleHandle response handler for the Moco framework to simulate repeated responses, provides the full Java implementation, demonstrates Groovy helper methods for easy usage, and briefly discusses Groovy's JVM compatibility advantages.
When using Moco API for request virtualization, the default extractor cannot handle POST JSON bodies, so this article shows how to implement a custom JsonExtractor in Java and use Groovy matchers to verify JSON parameters effectively.
Groovy, a dynamic JVM language praised for its concise syntax and powerful features like closures, has re‑entered the TIOBE Top 20 thanks to its role in Jenkins and Gradle, offering Java developers a compelling boost to Spring Boot productivity.
This article examines the challenges of Youzan's order export system, describes the migration from PHP‑based scripts to an Elasticsearch and HBase stack, and details the step‑by‑step configuration‑driven refactor—including enum field definitions, Groovy scripts, strategy patterns, plugin architecture, and quality‑assurance practices—that enabled million‑order exports with high performance and stability.