Software testing is a process designed to make sure computer code does what it is designed to do and that it doesn’t do anything unintended. It is used to achieve quality assurance, verification, validation and reliability estimation. It is a major quality control measure used during the software development. Testing is the process of operating a system or component under specified conditions, observing or recording the results, and making an evaluation of some aspect of system or a component.Testing of software is done at different levels of abstraction - unit, integration and system levels. During testing of software, there is a need to observe the internal and external execution details of the software. The internal execution details are required for the diagnosis of incorrect output during testing, and to ensure correctness of processing in case of a correct output. Without observing the internal execution details, the incorrect results may appear to be correct.
Logging is a systematic method of recording the internal information of software. It is one of the typical examples of crosscutting concern (concerns that are common to many of the core modules that span multiple modules). By examining the log, an unexpected system behavior can be identified and corrected. It acts as a diagnostic assistant to reveal the inner working of a system. Logging is also used for different purposes like debugging, testing, auditing, performance monitoring, code profiling, etc.
Besides logging, the theory of random phenomena has always had widespread appeal not least because of its application to games of chance and speculation. The fundamental notion is that of the expected value of a bet. The Monte Carlo method computes this expected value by simulating a large number of scenarios and averaging the observed payoff of the bet over all scenarios. The simulation of the scenarios is best performed by a computer program. Computational power is becoming cheap and programming languages more powerful and more elegant. Object orientation in particular represents a significant advance over procedural programming. Aspect-oriented programming (AOP) is a new programming paradigm [35]. It is popular for the use of modularizing concerns that that cross-cut the basic functionality of a program like logging. AOP has provided a new mechanism for encapsulating crosscutting concern in a module unit call aspect. The advantages of simulation techniques using AOP is discussed.
Inhaltsverzeichnis
- CHAPTER 1: Introduction
- 1.1 Introduction
- 1.2 Preliminary
- 1.2.1 Logging with AOP
- 1.2.3 Observability using AOP
- 1.2.4 Simulation using AOP
- 1.2.5 Aspect-based Testing Technique
- 1.2.6 Aspect Log - AutotraceAspect
- 1.2.7 Aspect execution
- 1.2.8 Logging Output
- 1.2.9 Test Coverage
- CHAPTER 2: Aspect-Oriented Software
- 2.1 Object-Oriented Paradigm
- 2.2 Aspect-Oriented Paradigm
- 2.3 Weaving with AOP
- 2.4 Crosscutting concerns with AOP
- 2.5 Comparison of OOP and AOP
- 2.6 Advantage of using AOP
- 2.7 Implementation of AOP
- CHAPTER 3: AspectJ
- 3.1 Introducing AspectJ
- 3.2 Dynamic Crosscutting Constructs
- 3.2.1 Join Point
- 3.2.2 Pointcut
- 3.2.3 Kinded Pointcuts
- 3.2.4 Non-kinded Pointcuts
- 3.2.5 Advice
- 3.2.6 Aspects
- 3.3 Static Crosscutting Constructs
- CHAPTER 4: An Overview of Logging with AOP
- 4.1 Overview
- 4.2 Logging with Java
- 4.2.1 Apache Log4j
- 4.2.2 Java Logging API
- 4.2.3 An example of Logging using Java API and Log4j
- 4.3 Logging for Observability of software
- 4.4 Logging with AOP
- 4.3.1 Testing
- 4.3.2 Exception Handling
- 4.3.3 Tracing
- 4.3.4 Code Profiling
- CHAPTER 5: Testing of Loop Join Points Using AspectJ
- 5.1 Overview
- 5.2 Unit testing
- 5.2.1 Unit testing using aspects
- 5.3 Loop Join Points
- 5.4 Aspect for Join Point
- 5.4.1 Checking Preconditions and Postconditions
- 5.4.2 Tracing Loop Joinpoint
- 5.4.3 Code Coverage
- CHAPTER 6: Observability and Logging using AOP
- 6.1 Overview
- 6.2 Use of Aspect for Increasing Observability
- 6.3 Aspect-based Testing Technique
- 6.4 Aspect Log - AutotraceAspect
- 6.4.1 Methods in Aspect
- 6.4.2 Logging aspect
- 6.5 Aspect execution
- 6.6 Output Report
- 6.6.1 Level of Testing
- 6.6.2 Unit Testing
- 6.6.3 Integration Testing
- 6.6.4 System Testing
- 6.6.5 Inheritance Property
- 6.6.6 Dynamic Binding
- 6.6.7 Test Coverage
- CHAPTER 7: Simulation with AOP
- 7.1 Random Variable
- 7.2 Stochastic process
- 7.2.1 Poisson Process
- 7.2.2 Markov Chains
- 7.2.3 Brownian Motion
- 7.3 Distribution Models
- 7.4 Monte Carlo Method
- APPENDIX A: Examples Illustrating Important Features of OOP
- A.1 Encapsulation and Information hiding
- A.2 Inheritance
- A.3 Overriding
- A.4 Polymorphism
- Bibliography
Zielsetzung und Themenschwerpunkte
This book explores the application of Aspect-Oriented Programming (AOP) in the context of logging, observability, and simulation. It aims to demonstrate how AOP can be used to enhance software development practices by addressing crosscutting concerns in a modular and efficient manner. The book focuses on AspectJ, a popular AOP framework for Java, and provides practical examples and case studies to illustrate the concepts.
- Logging and Observability with AOP
- Aspect-based Testing Techniques
- Simulation using AOP
- Integration of AOP with Java and other technologies
- Practical applications of AOP in software development
Zusammenfassung der Kapitel
Chapter 1 introduces the concept of AOP and its relevance to logging, observability, and simulation. It provides a background on the challenges associated with crosscutting concerns and how AOP can address them. The chapter also introduces the basic concepts of AOP, including join points, pointcuts, advice, and aspects.
Chapter 2 delves deeper into the principles of AOP, contrasting it with the object-oriented paradigm. It discusses the advantages of using AOP, such as improved modularity, reduced code duplication, and enhanced maintainability. The chapter also explores different approaches to implementing AOP, including static and dynamic weaving.
Chapter 3 focuses on AspectJ, a powerful AOP framework for Java. It introduces the key concepts of AspectJ, including join points, pointcuts, advice, and aspects. The chapter provides a detailed explanation of how to define and use aspects in AspectJ to address crosscutting concerns.
Chapter 4 explores the use of AOP for logging and observability. It discusses different logging frameworks, such as Apache Log4j and the Java Logging API, and demonstrates how AOP can be used to enhance logging capabilities. The chapter also covers techniques for tracing, exception handling, and code profiling using AOP.
Chapter 5 focuses on testing loop join points using AspectJ. It introduces the concept of loop join points and demonstrates how to define aspects to test the behavior of loops. The chapter covers techniques for checking preconditions and postconditions, tracing loop execution, and measuring code coverage.
Chapter 6 delves into the use of AOP for increasing observability and logging. It presents a case study of using AspectJ to create an autotrace aspect that logs method calls and execution times. The chapter also discusses different levels of testing and how AOP can be used to enhance testing practices.
Chapter 7 explores the application of AOP in simulation. It introduces the concepts of random variables, stochastic processes, and Monte Carlo methods. The chapter demonstrates how AOP can be used to simulate complex systems and analyze their behavior.
Schlüsselwörter
The keywords and focus themes of the text include Aspect-Oriented Programming (AOP), logging, observability, simulation, AspectJ, crosscutting concerns, join points, pointcuts, advice, aspects, testing, unit testing, integration testing, system testing, code coverage, random variables, stochastic processes, Monte Carlo methods, and practical applications of AOP in software development.
- Quote paper
- Mutum Meetei (Author), 2014, Logging and Simulation using Aspect Oriented Software, Munich, GRIN Verlag, https://www.grin.com/document/285596
-
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X. -
Upload your own papers! Earn money and win an iPhone X.