Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[recommenders-dev] Solicit for suggestions on writing tests

Hi,

I am now writing a set of JUnit tests for our project on argument recommendation.

When it comes to the part of testing the source code analysis based on ASTs, I have some difficulties in organizing the test cases and test data. Previously we manually set up a workspace (on our local machine) and created some Java projects in it to contain the Java source files which were used as test data. Also, we set up the classpaths properly to ensure the source file can compile. Then we launched our project, triggered the AST analyses, and checked the results.

Now we want to put everything related to testing into an Eclipse plugin project. In this case I am afraid it will be cumbersome (or improper) to create a local workspace. 

After browsing the existing test cases in Code Recommenders, I noticed that a class named CodeBuilder (written in Xtend) is often used to create code snippets which are used as test data. Is it the recommended way of creating source-code-like test data in Code Recommenders? If we create source streams in this way and parse them into compilation units, will there be some problems in resolving type bindings?

Thank you!

Best,
Cheng 



Back to the top