How to get .jtest projects to generate elsewhere?

LegacyForumLegacyForum Posts: 1,669 ✭✭
edited December 2016 in Jtest
How to get .jtest projects to generate
After running JTest for a specific project in Eclipse, the .jtest folder is created within my workspace. Is there anyway that I can direct it to generate the files somewhere else? I know that the results can be generated elsewhere, but how can I specify the path that I want the actual test files to be generated? Thank you for your help in advance!!

Comments

  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    Hi,

    The test classes will always be generated within your workspace, but you can specify where your workspace is on your machine. If you want the test classes to be generated in a different location within your workspace, you can change the output class pattern in your Jtest configuration. Go to the Generation tab, then the Test Class sub-tab to edit the output class.

    techie3
  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    Thank you for your response. Here's a follow-up question:

    If I move the test files that were generated in my workspace to another directory, and then link them to Eclipse as a new project, will I be able to have those same files be updated if I re-test my src project? Or, will there be files generated in my workspace once again?
  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    Yes, if you move the generated test project folder from your original workspace to a different directory and then import it back into your workspace (without copying the project into the workspace), Jtest will continue to update the test cases even though they aren't in the actual workspace.
  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    Thanks so much for the information. It has been very helpful!
  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    Hi,

    I have a similar/related question. Is there a way that I can display the values of the variables used in the output class? I was trying to generate a test at the same project as the source file, but within it, there is a test folder for the "source_folder". I tried replacing this variable with src/test (original source code is at src/java). But when I generate the test,no tests were created. Thanks.
  • LegacyForumLegacyForum Posts: 1,669 ✭✭

    Hi,

    I have a similar/related question. Is there a way that I can display the values of the variables used in the output class? I was trying to generate a test at the same project as the source file, but within it, there is a test folder for the "source_folder". I tried replacing this variable with src/test (original source code is at src/java). But when I generate the test,no tests were created. Thanks.

    I am not sure I fully understand your question. If you want to generate unit tests in the same project as your source code, then you would adjust the pattern in the Jtest configuration (post #2 above) so that the "Project Name = {$project_name}" instead of the default "{$project_name}.jtest"
Sign In or Register to comment.