0

Suppose I have source class with inheritance like (baseClassA -> subClassB), I would like to find if there any (testClassA -> testClassB). I know I can find it in IDE, but I would like to extract the data automatically.

RickyY9
  • 45
  • 6
  • What data do you want to extract? – aksappy Nov 13 '19 at 21:19
  • https://javaparser.org/setting-up-for-analysing-a-whole-project/ This link could be helpful if you want to analyze an entire directory with JavaParser – Lindstorm Nov 13 '19 at 21:32
  • @aksappy I want to check the inheritance structure of source class and their corresponding test class. – RickyY9 Nov 13 '19 at 21:35
  • What relationship between application class and test class do you assume? If you can describe this relationship in a systematic way, then JDT's API will let you program the desired analysis. – Stephan Herrmann Nov 15 '19 at 21:49
  • @StephanHerrmann I want to find the test subject of each test class. It just like one of the feature in IntelliJ IDEA (https://www.jetbrains.com/help/idea/navigating-between-test-and-test-subject.html) – RickyY9 Dec 06 '19 at 06:33
  • @RickyY9 I do not question the motivation, but you still didn't explain, what exactly identifies a class X as being the test class for class Y. Do you assume each test class extends the test subject? Furthermore, what identifies a test class in your case? A `@Test ` annotation, or `extends TestCase` or what? Once you describe these, the implementation with JDT will be straight forward, but not knowing what structures you want to search, nobody can advise how to implement this. – Stephan Herrmann Dec 06 '19 at 12:32

0 Answers0