Avoiding increasing size of artifacts from test
I'm recommending to enable option “Clean all files in the checkout directory before the build” in TeamCity. It allows to keep the most recent report after SOAtest execution in Report Tabs

Note: that additional option -fail is not mandatory, I'm using it to pass information to TeamCity system about failures during tests run, and will mark whole execution as failure if any test end with an error.

Comments

Hi! I have a follow up question. I have developed a test on my machine which I want to execute in the Team City which is installed on a remote server. Hence this command is working on my system:
C:\WINDOWS\system32\cmd.exe /s /c "C:\PROGRA~1\Parasoft\SOAtest\9.9\soatestcli.exe -config "Demo Configuration" -data C:\Users\E20028326\parasoft\gcr_ut_soa -resource Basic_Test.tst"

but not in team city as it's on remote server where SOATest is not installed hence it fails to find the following locations:
- C:\PROGRA~1\Parasoft\SOAtest\9.9\soatestcli.exe
- C:\Users\E20028326\parasoft\gcr_ut_soa -resource Basic_Test.tst

You have some options:
1. It appears that TeamCity has build agents that can be installed on different machines to which the TeamCity server can connect to launch builds. You could look into installing one of these agents on the same machine that SOAtest is on - see https://confluence.jetbrains.com/display/TCD10/Setting+up+and+Running+Additional+Build+Agents
2. Install SOAtest on the same machine as TeamCity.
3. You could start SOAtest in server mode, and then access it via the SOAtest server REST API to tell it to run your tests and get results - see the SOAtest Help topic Parasoft SOAtest User's Guide > Setup and Testing Fundamentals > Using SOAtest APIs
4. If you have Parasoft CTP, you can create a job within CTP that executes your SOAtest tests. Then you can use the CTP REST API to trigger the tests to be run.

@reactancexl Yes, if you are using build agents with batch file then fine ( batch file should allow you to run SOAtest scenario from command line.
Suggestion: Reference that share name on teamcity command line. \server\sharename\nameOfBatchFile will not work as you are running such batch file in different environment

apparently you don't have a valid license for machine where you want to run SOAtest using command line.
You need a license which allows you run SOAtest in cli mode (command line feature)
If you have such license please check in User Manual how to use local settings file to provide a license.