Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AJDT » Sharing aspecs between src and test module?(I have defined an aspect in the src module but it does not seem to apply to code in the test module)
Sharing aspecs between src and test module? [message #1850973] Wed, 23 March 2022 17:35 Go to next message
Kevin Kraft is currently offline Kevin KraftFriend
Messages: 3
Registered: March 2022
Junior Member
Hi. I am writing Aspects to monitor/intercept test code. I am defining them in the src module but they don't seem to apply unless I define them in the test module instead (where the actual tests are). However, I also want to monitor/intercept test framework code in the src module. (Note that I also tried setting <scope>test</scope> for the aspect dependencies in my pom file.)

I can envision a couple of approaches (aside from my attempt to set scope, above):

1. Define the aspects in the test module and use cflow() for my pointcut definition (which will hopefully cover framework code from src as well)

2. Define an abstract aspect in src and extend it with the proper pointcuts in src and test

Do those ideas make sense? Any other suggestions/ideas? Thanks!
Re: Sharing aspecs between src and test module? [message #1861462 is a reply to message #1850973] Fri, 13 October 2023 19:15 Go to previous messageGo to next message
Jack Jones is currently offline Jack JonesFriend
Messages: 24
Registered: September 2023
Junior Member
Creating an abstract aspect in the src module and extending it in both src and test can provide a clean and maintainable solution. By defining the common pointcuts and functionalities in the abstract aspect, you can then specialize and customize its behavior in the individual aspects within the src and test modules.
Re: Sharing aspecs between src and test module? [message #1861469 is a reply to message #1861462] Fri, 13 October 2023 19:48 Go to previous message
Kevin Kraft is currently offline Kevin KraftFriend
Messages: 3
Registered: March 2022
Junior Member
Thanks!
Previous Topic:Joinpoint for TestNG tests?
Next Topic:Is it possible to weave 2 different classes ?
Goto Forum:
  


Current Time: Sat Nov 11 06:51:28 GMT 2023

Powered by FUDForum. Page generated in 0.02051 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top