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.

* Import project into workspace

Options
LegacyForum
LegacyForum Posts: 1,664 ✭✭
Hello All,
We are using soatest with hudson framework as a part of continuous build, the soatest project is checked into the subversion and hudson framework is configured to runt the soatest using the SoaTest servers in command line mode,
Initially we import the project into the soatest workspace using the -import command line option , but when the soatest test project been modified into the subversion this has to be re-imported into the soatest workspace and during this time when the -import option is used soatest throws an error

!ENTRY com.parasoft.xtest.checkers.eclipse.core.cli8.EclipseCliRunnable 4 0 2010-06-16 11:57:17.085
!MESSAGE Could not import project into workspace. A project with this name already exists.
!STACK 0
Could not import project into workspace. A project with this name already exists.
at com.parasoft.xtest.application.api.resource.UAppWorkspace.importProject(UAppWork
pace.java:173)
at com.parasoft.xtest.checkers.api.cli8.AbstractCliRunnable.runImport(AbstractCliRu
nable.java:276)
at com.parasoft.xtest.testcases.eclipse.core.web.internal.cli.EclipseWebTestCliRunn
ble.run(EclipseWebTestCliRunnable.java:172)
at com.parasoft.xtest.checkers.eclipse.core.cli8.EclipseCliRunnable.run(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(Ecl
pseAppContainer.java:574)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:195)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(Ecli
seAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLau
cher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
!SESSION 2010-06-16 11:57:50.496 -----------------------------------------------


Following is the full command line :
./soatestcli -config "user://Example Configuration" -import "${WORKSPACE}/Local" -data "/usr/local/tomcat/.soatest_linux/workspace" -resource "/Local" -report "/usr/local/tomcat/.hudson/jobs/ExampleSOATestDemo/workspace/Local/result"

is there any command line option to re-import the project into the workspace?

Comments

  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Options
    Once a project has been imported into the workspace, it cannot be re-imported and overwritten; if you try, it will give you the stack trace you're observing. However, you can perform an update, such as "svn update", which you would have to perform through a shell script.

    But, we recommend as a best practice that for nightly automation tests, you should delete all file in the workspace directory, check out all the projects from your repository or source control, and re-import them into the new workspace, then run the tests in this new workspace. A simple example using subversion would be:

    # checkout projects containing tst files from subversion into a new workspace directory
    rm -rf workspacedir
    mkdir workspacedir
    cd workspacedir
    svn co project1
    svn co project2
    # import those projects into the new workspace
    soatestcli -data workspacedir -import project1
    soatestcli -data workspacedir -import project2
    # run tests
    soatestcli -data workspacedir -config "Demo Configuration" -resource /project1 -resource /project2 -localsettings yourlocalsettingsfile -report yourreportdir

    Best regards,

    orson
  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    Options
    Thanks orson, this is very useful.