TULIP command guide

VAR: name of the variable which will be tested. VALUE: value to compare the variable with. OPER: one of the allowed operands. LESS: true if the variable is less ...
296KB taille 1 téléchargements 329 vues
TULIP command guide

(Baseline version 1.0)

1

Table of content : MISCELLANEOUS (tlUtils.dll) ............................................................................................................ 4 1. SEQ ............................................................................................................................................. 4 2. EXEC .......................................................................................................................................... 4 3. SPAWN_AGENT ....................................................................................................................... 6 4. STATE ........................................................................................................................................ 7 5. DECLARE .................................................................................................................................. 8 6. VARIABLE ................................................................................................................................ 9 7. RESPONDER ........................................................................................................................... 10 8. RECEIVE.................................................................................................................................. 11 9. MATCH .................................................................................................................................... 12 10. START_RESPONDER......................................................................................................... 13 11. FAULT.................................................................................................................................. 14 12. SET_AGENT_PARAM........................................................................................................ 15 13. SUSPEND............................................................................................................................. 16 14. RESUME .............................................................................................................................. 16 15. STOP..................................................................................................................................... 18 16. KILL ..................................................................................................................................... 18 17. EXIT ..................................................................................................................................... 20 18. SET_COLLECTOR.............................................................................................................. 20 19. SET_SCHEDULER.............................................................................................................. 21 20. TRACE ................................................................................................................................. 22 21. DUMP_AGENT ................................................................................................................... 23 22. TRAFFIC_ANALYSIS ........................................................................................................ 24 23. GET_NB_PERIODS............................................................................................................. 25 Protocol specific (xxx.dll)..................................................................................................................... 26 1. EXPECTED .............................................................................................................................. 26 2. SEND ........................................................................................................................................ 27 3. CHANGE_PORT...................................................................................................................... 28 4. TEST_SEND............................................................................................................................. 28 5. TEST_RECEIVE ...................................................................................................................... 29 6. MESSAGE................................................................................................................................ 30 1. SWITCH ................................................................................................................................... 31 2. CASE ........................................................................................................................................ 32 3. DEFAULT ................................................................................................................................ 33 4. SET ........................................................................................................................................... 34 5. CAT........................................................................................................................................... 34 6. MIDDLE ................................................................................................................................... 36 7. LEFT ......................................................................................................................................... 36 8. RIGHT ...................................................................................................................................... 38 9. IF ............................................................................................................................................... 39 10. THEN.................................................................................................................................... 40 11. FOR....................................................................................................................................... 41 12. WHILE.................................................................................................................................. 42 13. ADD...................................................................................................................................... 43 14. SUBTRACT.......................................................................................................................... 44

2

15. MULTIPLY .......................................................................................................................... 45 16. DIVIDE................................................................................................................................. 46 17. PRINT_VAR......................................................................................................................... 47 18. PRINT ................................................................................................................................... 47 19. TEMPO ................................................................................................................................. 48 20. LENGTH............................................................................................................................... 49 21. CHAR_AT ............................................................................................................................ 49 22. CLEARSCREEN .................................................................................................................. 50 23. AND...................................................................................................................................... 50 24. NOT ...................................................................................................................................... 52 25. OR ......................................................................................................................................... 52 26. XOR ...................................................................................................................................... 54 27. MODULO ............................................................................................................................. 55 28. SHIFT ................................................................................................................................... 56 29. CHANGE_ENDIAN............................................................................................................. 57 30. TO_HEXA ............................................................................................................................ 57 31. TO_HEXA ............................................................................................................................ 58 System (tlSystem.dll)............................................................................................................................ 59 1. GET_SYSTEM ......................................................................................................................... 59 Time (tlTime.dll)................................................................................................................................... 60 2. START_WATCH ..................................................................................................................... 60 3. STOP_WATCH ........................................................................................................................ 61 4. RESET_WATCH...................................................................................................................... 62 5. ON_WATCH ............................................................................................................................ 63 Crypto (tlCrypto.dll) ............................................................................................................................. 64 1. MD5SUM ................................................................................................................................. 64 2. SHA1SUM................................................................................................................................ 65 3. RANDOM................................................................................................................................. 66 4. TO_BASE64 ............................................................................................................................. 67 5. CRC32SUM.............................................................................................................................. 68

3

MISCELLANEOUS (tlUtils.dll) 1.

SEQ

Library : tlUtils.dll Attributes : None. Content : Any command. Role : Body of the scenario (launcher, responder, traffic agent), encloses all the other commands. SEQ anchor should start every test sheet. Example : Hello World Result: Hello World

2.

EXEC

Library : tlUtils.dll Attributes : FILE : filename of the test sheet (plain text, usually ends with .xml), in global or relative format (if no directory, will assume the test sheet is located together with the caller test sheet. Content : None. Role : Execute a test sheet within the current execution scope (global variables). If the test sheet was compiled together with the tulip.xml file, it will also use the same constants. Example : 4

Result: File ABODR.XML will be executed as if the commands were part of the caller test sheet. In case the file des not exists, there is a non blocking error message.

5

3.

SPAWN_AGENT

Library : tlUtils.dll Attributes : SELECTOR: name of the test agent parameter used as the selection criteria. VALUE: value of the selector used. Content : Any command. Role : Starts concurrents thread to the current one, each dedicated to a traffic agent. The attributes provide a flexible way to select which traffic agent to start. The agents will execute in loop,depending on SCHEDULER parameters in tulip.xml. The fields selected are the agent attributes as defined in tulip.xml file. From that time, all agent attributes can be accessed as normal variables. Example : URI of caller traffic agent is ~URI~ Result: URI of caller traffic agent is test1 URI of caller traffic agent is test2 URI of caller traffic agent is test3

6

4.

STATE

Library : tlUtils.dll Attributes : NUM: index of the current state. Content : None. Role : Works as a label for the current agent status. This is used for test result analysis, as it is kept in log each time an error occurs. The state label is global to the agent in execution, each time it is set it will not change until set again or if the agent loops back. By default it is equal to 0. The STATE is an agent attribute, it can be obtained anytime like any variable Example :