Spring Boot Software Testing 2 - Actuator - Finite State Machine

Finite State machine Finite models are essential in testing for simplifying complex systems, allowing exhaustive testing, and facilitating automated test case generation. They offer a clear way to represent systems as finite state machines, making it possible to explore all possible states and transitions. This approach is critical for ensuring systems behave as expected under every scenario, especially in critical applications where failure is unacceptable. Key benefits include: Simplification: Reducing complex systems to manageable models. Exhaustive Testing: Enabling complete coverage of all possible states and transitions. Automated Testing: Supporting the generation of test cases and regression testing. Formal Verification: Allowing mathematical proofs of system correctness through model checking and other formal methods. Finite models are widely used in software and hardware testing to improve test coverage, find potential issues, and ensure system reliability. However, challenges such as scalability and the accuracy of the models must be managed to ensure effective testing outcomes. ...

March 31, 2024 · 3 min · 513 words · Mr.W

Spring Boot Software Testing 1, Partitioning and Functioning testing

Spring Boot is a project under the Spring Framework that simplifies developing, configuring, and deploying Spring-based applications. It promotes convention over configuration by offering pre-configured setups and auto-configuration based on project dependencies, eliminating much of the manual setup and configuration work. Spring Boot applications are stand-alone, containing an embedded web server for easy deployment as a single executable JAR. It offers opinionated defaults to reduce development effort, while still allowing for customization. Features like Actuator provide built-in endpoints for application monitoring and management. Primarily written in Java, Spring Boot supports other JVM languages like Kotlin and Groovy, making it versatile for various enterprise applications. Its goal is to enable quick application startup with less code and configuration hassle. ...

March 30, 2024 · 10 min · 2050 words · Mr.W

Size measurement parameters -- client, offset and scroll

Prerequisite: You need to familiar with the box model Understanding the differences between clientHeight/clientLeft, offsetHeight/offsetLeft, and scrollTop/scrollLeft in the context of the Document Object Model (DOM) is crucial for effective web design and development. These properties are used to measure different aspects of elements’ size and position in relation to their content, padding, border, and scroll position. Client clientHeight and clientLeft will give you the height and width of an element including padding. However, client will not calculate the size of the borders and margins. clientHeight/clientLeft are useful for understanding the visible part of an element, particularly for styling purposes or when dealing with scrolling. It’s a read-only property, which means you can not modify the params and generate action. Offset Similar with client, offsetHeight, offsetLeft will output the element height and width but including verical and horizontal border, in pixel. offsetHeight/offsetLeft are often used when you need to know the actual size of the element including borders and its position in the layout. Same as client, offsetHeight/offsetLeft is a read only param. ...

January 8, 2024 · 2 min · 406 words · Mr.W

Scroll Event

The scroll event in JavaScript is an important event that is triggered whenever an element or the window is scrolled. This event is particularly useful for creating dynamic effects based on the scroll position, such as parallax animations, infinite scrolling, or showing/hiding navigation bars. Here’s an overview of the scroll event: 1. How it Works: The scroll event fires when the document view or an element has been scrolled. It applies to any scrollable element, including the window. ...

January 7, 2024 · 2 min · 332 words · Mr.W

Event flow , capture, bubble and how to stop bubbling

Event Bubbling in JavaScript Event capturing is an event handling mechanism in JavaScript, contrasting with event bubbling. During the capturing phase, an event starts at the root node (usually the document object) and propagates down the DOM tree to the target element, where the event actually took place. The process of event capturing is as follows: Capturing Phase: When an event occurs, it is first captured at the topmost node of the DOM tree, then propagates downwards, level by level, until it reaches the target element. During this phase, only those event listeners set to use capturing mode are triggered. ...

December 30, 2023 · 3 min · 499 words · Mr.W