Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

How to get .jtest projects to generate elsewhere?

LegacyForum
LegacyForum Posts: 1,664 ✭✭
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

  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    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
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    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?
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    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.
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Thanks so much for the information. It has been very helpful!
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    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.
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭

    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"