Calling the program

A simple call of AutoLoader could look as follows:

ToscaTDM.AutoLoader.exe "C:\Users\Tester1\Documents\Test Data\testproject.ttsal"

or on Linux:

dotnet ToscaTDM.AutoLoader.dll "/users/Tester1/Documents/Test Data/testproject.ttsal"

This would process all tasks in the project testproject for the user Tester1 (provided that the AL project contains valid tasks).

Recommendations:

  • Paths should be entered fully qualified and must be checked before running the program.

  • Paths should be enclosed in quote marks to avoid errors caused by folder names that include spaces.

  • Make sure you check the access rights for writing to the Windows event log.

  • Reading out the ERRORLEVEL should be done directly after the data generation has completed.

  • Use a batch file for calling AutoLoader to simplify the handling of the application, especially when testing.

Below is an example of a very simple batch file for testing scenarios with call of AutoLoader and reading out of the ERRORLEVEL variable. Path names may have to be adjusted as necessary.

@echo off

REM Change to the directory that contains ToscaTDM.AutoLoader.exe.

cd "C:\AutoLoader"

REM The next line contains the call and call parameters.

ToscaTDM.AutoLoader.exe /v "C:\Users\Tester1\Documents\Test Data\testproject.ttsal"

@echo off

REM Read out error level and write into .txt file.

@IF "%ERRORLEVEL%" == "1" goto error

@IF "%ERRORLEVEL%" == "0" goto success

:error

@echo ERROR_1 %3 Date: %date% Time: %time% >> C:\Users\Tester1\Desktop\Testbatch\errorlog.txt

goto end

:success

@echo SUCCESS_0 %3 Date: %date% Time: %time% >> C:\Users\Tester1\Desktop\Testbatch\errorlog.txt

goto end

:end

Reading out the error value always writes one result per line to the file errorlog.txt. If this file does not exist, it is created. If it does exist, the result line is appended to it. The result line contains the result SUCCESS_0 or ERROR_1 followed by the date and time.