Priyadarshi Kunal
Priyadarshi Kunal

Reputation: 578

How to run my project so that they use my AspectJ aspects

I am a beginner to AspectJ. I am using it to take screenshots in my webdriver programs. Following is my package structure.

Project Structure

I want to know that how do I run my programs in Browser class so that it uses AspectJ aspects defined in the Screenshots class.

Right now when I run my tests as TestNG tests in eclipse the aspects do not run.

Upvotes: 0

Views: 570

Answers (1)

Eugene Ryzhikov
Eugene Ryzhikov

Reputation: 17359

  1. Make sure that you have AspectJ Development Tools plugin installed
  2. Convert your project to AspectJ project using context menu Configure/Convert to AspectJ project

Your project should work now using internal aspects. If the aspects are external - put them on your class path.

Upvotes: 1

Related Questions