on ‎2010 Jan 17 6:49 AM
Hi All,
I need to import number of transport requests in Quality Assurance System all at once so I decided to use TP Import in command line.
The main issue is I don't know how to handle Error and Warning. I don't want to continue import process if one transport request encounter Error or Warning. I don't know how to use TP return code to handle this situation
Any idea regarding this issue will be appreciated,
Sanaz.
Request clarification before answering.
Hi all.
for Windows platforms you can do some testing on return codes of executed programs. TP does return error codes, so you can test for failure within your .cmd file.
An example command file which shows how to handle return codes from TP is shown below. Save it to test.cmd and run it in an opened command window.
For lots of transports, create a function in your command file and feed transport requests to this function. This will make the script more readable.
@echo off
echo.Execute tp help
tp help > mytp.log
if errorlevel 1 (
echo.tp help executed NOT successful, result = %errorlevel%
echo.aborting script
pause
) else (
echo.tp help executed successful, result = %errorlevel%
)
echo.
echo.Execute tp without arguments
tp >> mytp.log
if errorlevel 1 (
echo.tp without arguments executed NOT successful, result = %errorlevel%
echo.Press Ctrl-C to abort, or enter to continue
pause
) else (
echo.tp without arguments executed successful, result = %errorlevel%
)
echo.
echo.Tp script succesfullyHope this answers your question.
Best regards,
Edward
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.