mmt-mcp 1.42.2-pre

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (343) hide show
  1. package/README.md +22 -0
  2. package/dist/examples/README.md +19 -0
  3. package/dist/examples/ai/golden_smoke/README.md +8 -0
  4. package/dist/examples/ai/golden_smoke/apis/echo.mmt +12 -0
  5. package/dist/examples/ai/golden_smoke/tests/echo-smoke.mmt +18 -0
  6. package/dist/examples/basic/01_simple_api/README.md +38 -0
  7. package/dist/examples/basic/01_simple_api/get_json.mmt +6 -0
  8. package/dist/examples/basic/01_simple_api/post_echo_json_body.mmt +13 -0
  9. package/dist/examples/basic/01_simple_api/post_echo_yaml_body.mmt +11 -0
  10. package/dist/examples/basic/02_simple_test/README.md +35 -0
  11. package/dist/examples/basic/02_simple_test/echo_test.mmt +12 -0
  12. package/dist/examples/basic/03_environment_variables/README.md +40 -0
  13. package/dist/examples/basic/03_environment_variables/get_json.mmt +6 -0
  14. package/dist/examples/basic/03_environment_variables/multimeter.mmt +3 -0
  15. package/dist/examples/basic/04_basic_suite/README.md +33 -0
  16. package/dist/examples/basic/04_basic_suite/suite.mmt +6 -0
  17. package/dist/examples/basic/04_basic_suite/tests/get_status_test.mmt +9 -0
  18. package/dist/examples/basic/04_basic_suite/tests/post_echo_test.mmt +12 -0
  19. package/dist/examples/basic/05_basic_documentation/README.md +24 -0
  20. package/dist/examples/basic/05_basic_documentation/api/get_user.mmt +12 -0
  21. package/dist/examples/basic/05_basic_documentation/document.mmt +4 -0
  22. package/dist/examples/examples-index.json +1559 -0
  23. package/dist/examples/intermediate/01_api_inputs_outputs/README.md +46 -0
  24. package/dist/examples/intermediate/01_api_inputs_outputs/get_dot_notation.mmt +14 -0
  25. package/dist/examples/intermediate/01_api_inputs_outputs/get_with_outputs.mmt +10 -0
  26. package/dist/examples/intermediate/01_api_inputs_outputs/post_regex_outputs.mmt +24 -0
  27. package/dist/examples/intermediate/01_api_inputs_outputs/post_with_inputs_outputs.mmt +20 -0
  28. package/dist/examples/intermediate/02_websocket/README.md +44 -0
  29. package/dist/examples/intermediate/02_websocket/ws_echo.mmt +11 -0
  30. package/dist/examples/intermediate/02_websocket/ws_json_echo.mmt +16 -0
  31. package/dist/examples/intermediate/03_graphql/README.md +10 -0
  32. package/dist/examples/intermediate/03_graphql/graphql_query.mmt +16 -0
  33. package/dist/examples/intermediate/03_graphql/graphql_variables.mmt +25 -0
  34. package/dist/examples/intermediate/04_grpc/README.md +10 -0
  35. package/dist/examples/intermediate/04_grpc/grpc_server_stream.mmt +15 -0
  36. package/dist/examples/intermediate/04_grpc/grpc_unary.mmt +13 -0
  37. package/dist/examples/intermediate/05_api_documentation/README.md +33 -0
  38. package/dist/examples/intermediate/05_api_documentation/api/get_users.mmt +13 -0
  39. package/dist/examples/intermediate/05_api_documentation/api/post_create_user.mmt +25 -0
  40. package/dist/examples/intermediate/05_api_documentation/api/ws_notifications.mmt +18 -0
  41. package/dist/examples/intermediate/05_api_documentation/document.mmt +17 -0
  42. package/dist/examples/intermediate/05_api_documentation/markdown_api/health_check.mmt +6 -0
  43. package/dist/examples/intermediate/05_api_documentation/markdown_api/overview.md +77 -0
  44. package/dist/examples/intermediate/05_api_documentation/markdown_api/search_products.mmt +15 -0
  45. package/dist/examples/intermediate/05_api_documentation/markdown_api/submit_order.mmt +18 -0
  46. package/dist/examples/intermediate/06_imports/README.md +92 -0
  47. package/dist/examples/intermediate/06_imports/apis/echo_api.mmt +13 -0
  48. package/dist/examples/intermediate/06_imports/apis/greet_api.mmt +13 -0
  49. package/dist/examples/intermediate/06_imports/multimeter.mmt +5 -0
  50. package/dist/examples/intermediate/06_imports/test_relative.mmt +15 -0
  51. package/dist/examples/intermediate/06_imports/test_root_import.mmt +14 -0
  52. package/dist/examples/intermediate/06_imports/tests/test_api.mmt +30 -0
  53. package/dist/examples/intermediate/07_simple_suite/README.md +56 -0
  54. package/dist/examples/intermediate/07_simple_suite/api/echo_api.mmt +12 -0
  55. package/dist/examples/intermediate/07_simple_suite/api/status_api.mmt +8 -0
  56. package/dist/examples/intermediate/07_simple_suite/suite_parallel.mmt +11 -0
  57. package/dist/examples/intermediate/07_simple_suite/suite_sequential.mmt +14 -0
  58. package/dist/examples/intermediate/07_simple_suite/test/echo_test.mmt +16 -0
  59. package/dist/examples/intermediate/07_simple_suite/test/echo_test_fail.mmt +15 -0
  60. package/dist/examples/intermediate/07_simple_suite/test/status_test.mmt +11 -0
  61. package/dist/examples/intermediate/07_simple_suite/test/status_test_fail.mmt +11 -0
  62. package/dist/examples/intermediate/08_chained_api_calls/README.md +58 -0
  63. package/dist/examples/intermediate/08_chained_api_calls/api/get_profile.mmt +15 -0
  64. package/dist/examples/intermediate/08_chained_api_calls/api/login.mmt +17 -0
  65. package/dist/examples/intermediate/08_chained_api_calls/chained_test.mmt +31 -0
  66. package/dist/examples/intermediate/09_csv_data_driven_test/README.md +80 -0
  67. package/dist/examples/intermediate/09_csv_data_driven_test/echo_api.mmt +14 -0
  68. package/dist/examples/intermediate/09_csv_data_driven_test/echo_csv_test.mmt +18 -0
  69. package/dist/examples/intermediate/10_environment_presets/README.md +58 -0
  70. package/dist/examples/intermediate/10_environment_presets/api/echo_env.mmt +14 -0
  71. package/dist/examples/intermediate/10_environment_presets/multimeter.mmt +22 -0
  72. package/dist/examples/intermediate/10_environment_presets/test/preset_test.mmt +14 -0
  73. package/dist/examples/intermediate/11_control_flow/README.md +48 -0
  74. package/dist/examples/intermediate/11_control_flow/api/echo.mmt +13 -0
  75. package/dist/examples/intermediate/11_control_flow/for_loop_test.mmt +15 -0
  76. package/dist/examples/intermediate/11_control_flow/if_else_test.mmt +19 -0
  77. package/dist/examples/intermediate/11_control_flow/repeat_delay_test.mmt +24 -0
  78. package/dist/examples/intermediate/12_random_values/README.md +59 -0
  79. package/dist/examples/intermediate/12_random_values/api/random_echo.mmt +21 -0
  80. package/dist/examples/intermediate/12_random_values/random_values_test.mmt +15 -0
  81. package/dist/examples/intermediate/13_stages_and_conditions/README.md +58 -0
  82. package/dist/examples/intermediate/13_stages_and_conditions/api/get_profile.mmt +13 -0
  83. package/dist/examples/intermediate/13_stages_and_conditions/api/get_settings.mmt +13 -0
  84. package/dist/examples/intermediate/13_stages_and_conditions/api/login.mmt +15 -0
  85. package/dist/examples/intermediate/13_stages_and_conditions/stages_test.mmt +40 -0
  86. package/dist/examples/intermediate/14_javascript_helpers/README.md +59 -0
  87. package/dist/examples/intermediate/14_javascript_helpers/api/echo.mmt +13 -0
  88. package/dist/examples/intermediate/14_javascript_helpers/js_test.mmt +31 -0
  89. package/dist/examples/intermediate/15_http_files/README.md +25 -0
  90. package/dist/examples/intermediate/15_http_files/import_http_in_test.mmt +8 -0
  91. package/dist/examples/intermediate/16_bruno_files/README.md +36 -0
  92. package/dist/examples/intermediate/16_bruno_files/import_bruno_in_test.mmt +18 -0
  93. package/dist/examples/intermediate/16_bruno_files/library/README.md +8 -0
  94. package/dist/examples/intermediate/17_api_authentication/README.md +35 -0
  95. package/dist/examples/intermediate/17_api_authentication/get_with_apikey_auth.mmt +10 -0
  96. package/dist/examples/intermediate/17_api_authentication/get_with_basic_auth.mmt +10 -0
  97. package/dist/examples/intermediate/17_api_authentication/get_with_bearer_auth.mmt +9 -0
  98. package/dist/examples/intermediate/18_simple_mock_server/README.md +92 -0
  99. package/dist/examples/intermediate/18_simple_mock_server/api/create_user.mmt +15 -0
  100. package/dist/examples/intermediate/18_simple_mock_server/api/get_health.mmt +9 -0
  101. package/dist/examples/intermediate/18_simple_mock_server/api/get_user.mmt +12 -0
  102. package/dist/examples/intermediate/18_simple_mock_server/api/search.mmt +11 -0
  103. package/dist/examples/intermediate/18_simple_mock_server/server/mock_server.mmt +46 -0
  104. package/dist/examples/intermediate/18_simple_mock_server/suite.mmt +12 -0
  105. package/dist/examples/intermediate/18_simple_mock_server/test/health_test.mmt +13 -0
  106. package/dist/examples/intermediate/18_simple_mock_server/test/search_test.mmt +15 -0
  107. package/dist/examples/intermediate/18_simple_mock_server/test/user_test.mmt +27 -0
  108. package/dist/examples/intermediate/19_environment_post_echo/README.md +33 -0
  109. package/dist/examples/intermediate/19_environment_post_echo/multimeter.mmt +4 -0
  110. package/dist/examples/intermediate/19_environment_post_echo/post_echo.mmt +12 -0
  111. package/dist/examples/intermediate/20_document_parameters/README.md +25 -0
  112. package/dist/examples/intermediate/20_document_parameters/api/search_users.mmt +28 -0
  113. package/dist/examples/intermediate/20_document_parameters/document.mmt +6 -0
  114. package/dist/examples/intermediate/21_manual_timeout/README.md +22 -0
  115. package/dist/examples/intermediate/21_manual_timeout/manual_timeout.mmt +11 -0
  116. package/dist/examples/intermediate/22_omit_keyword/README.md +45 -0
  117. package/dist/examples/intermediate/22_omit_keyword/omit_keyword.mmt +34 -0
  118. package/dist/examples/intermediate/22_omit_keyword/omit_keyword_test.mmt +19 -0
  119. package/dist/examples/intermediate/23_check_operators/README.md +31 -0
  120. package/dist/examples/intermediate/23_check_operators/api/sample.mmt +27 -0
  121. package/dist/examples/intermediate/23_check_operators/operators_test.mmt +54 -0
  122. package/dist/examples/intermediate/24_test_call_cache/README.md +34 -0
  123. package/dist/examples/intermediate/24_test_call_cache/api/login_echo.mmt +19 -0
  124. package/dist/examples/intermediate/24_test_call_cache/create_session.mmt +28 -0
  125. package/dist/examples/intermediate/24_test_call_cache/use_session_cache.mmt +41 -0
  126. package/dist/examples/intermediate/25_convert_to_mmt/README.md +17 -0
  127. package/dist/examples/intermediate/25_convert_to_mmt/bruno/README.md +5 -0
  128. package/dist/examples/intermediate/25_convert_to_mmt/bruno/converted/api/create-user.mmt +11 -0
  129. package/dist/examples/intermediate/25_convert_to_mmt/bruno/converted/tests/create-user.mmt +11 -0
  130. package/dist/examples/intermediate/25_convert_to_mmt/http/README.md +5 -0
  131. package/dist/examples/intermediate/25_convert_to_mmt/http/converted/api/ping.mmt +9 -0
  132. package/dist/examples/intermediate/25_convert_to_mmt/http/converted/tests/source-http.mmt +11 -0
  133. package/dist/examples/intermediate/25_convert_to_mmt/openapi/README.md +5 -0
  134. package/dist/examples/intermediate/25_convert_to_mmt/openapi/converted/api/get-sample-json.mmt +8 -0
  135. package/dist/examples/intermediate/25_convert_to_mmt/postman/README.md +7 -0
  136. package/dist/examples/intermediate/25_convert_to_mmt/postman/converted/api/ping.mmt +23 -0
  137. package/dist/examples/intermediate/25_convert_to_mmt/postman/converted/suites/collection.mmt +7 -0
  138. package/dist/examples/intermediate/25_convert_to_mmt/postman/converted/tests/collection.mmt +17 -0
  139. package/dist/examples/intermediate/25_convert_to_mmt/wsdl/README.md +5 -0
  140. package/dist/examples/intermediate/25_convert_to_mmt/wsdl/converted/api/ping.mmt +21 -0
  141. package/dist/examples/intermediate/26_yaml_expect_typing/README.md +21 -0
  142. package/dist/examples/intermediate/26_yaml_expect_typing/typing_test.mmt +29 -0
  143. package/dist/examples/intermediate/27_ai_judge/README.md +31 -0
  144. package/dist/examples/intermediate/27_ai_judge/judge_demo.mmt +33 -0
  145. package/dist/examples/intermediate/27_ai_judge/judges/gemini.mmt +12 -0
  146. package/dist/examples/intermediate/27_ai_judge/judges/ollama.mmt +8 -0
  147. package/dist/examples/professional/01_report_generation/README.md +87 -0
  148. package/dist/examples/professional/01_report_generation/api/echo.mmt +13 -0
  149. package/dist/examples/professional/01_report_generation/suite.mmt +12 -0
  150. package/dist/examples/professional/01_report_generation/test/fail_test.mmt +11 -0
  151. package/dist/examples/professional/01_report_generation/test/pass_test.mmt +17 -0
  152. package/dist/examples/professional/02_tls_certificates/README.md +113 -0
  153. package/dist/examples/professional/02_tls_certificates/api/secure_echo.mmt +13 -0
  154. package/dist/examples/professional/02_tls_certificates/env.mmt +17 -0
  155. package/dist/examples/professional/02_tls_certificates/tls_test.mmt +12 -0
  156. package/dist/examples/professional/03_load_test/README.md +39 -0
  157. package/dist/examples/professional/03_load_test/echo_api.mmt +12 -0
  158. package/dist/examples/professional/03_load_test/echo_test.mmt +14 -0
  159. package/dist/examples/professional/03_load_test/loadtest.mmt +15 -0
  160. package/dist/examples/professional/04_convert_to_mmt/README.md +30 -0
  161. package/dist/examples/professional/04_convert_to_mmt/bruno/README.md +8 -0
  162. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/basic-auth-check.mmt +9 -0
  163. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/bearer-auth-check.mmt +12 -0
  164. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/cache-headers.mmt +9 -0
  165. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/delayed-response.mmt +9 -0
  166. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/echo-anything-alias.mmt +11 -0
  167. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/echo-delete.mmt +9 -0
  168. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/echo-get-with-query.mmt +10 -0
  169. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/echo-post-body.mmt +13 -0
  170. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/echo-put-body.mmt +14 -0
  171. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/get-sample-html.mmt +9 -0
  172. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/get-sample-json.mmt +9 -0
  173. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/get-sample-xml.mmt +9 -0
  174. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/method-match-get.mmt +9 -0
  175. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/random-bytes.mmt +9 -0
  176. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/redirect-twice.mmt +9 -0
  177. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/return-client-ip.mmt +9 -0
  178. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/return-cookies.mmt +9 -0
  179. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/return-request-headers.mmt +10 -0
  180. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/return-status-200.mmt +9 -0
  181. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/return-status-404.mmt +9 -0
  182. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/service-help.mmt +9 -0
  183. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/set-cookie.mmt +9 -0
  184. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/basic-auth-check.mmt +11 -0
  185. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/bearer-auth-check.mmt +11 -0
  186. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/cache-headers.mmt +11 -0
  187. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/delayed-response.mmt +11 -0
  188. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/echo-anything-alias.mmt +11 -0
  189. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/echo-delete.mmt +11 -0
  190. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/echo-get-with-query.mmt +11 -0
  191. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/echo-post-body.mmt +11 -0
  192. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/echo-put-body.mmt +11 -0
  193. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/get-sample-html.mmt +11 -0
  194. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/get-sample-json.mmt +11 -0
  195. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/get-sample-xml.mmt +11 -0
  196. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/method-match-get.mmt +11 -0
  197. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/random-bytes.mmt +11 -0
  198. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/redirect-twice.mmt +11 -0
  199. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/return-client-ip.mmt +11 -0
  200. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/return-cookies.mmt +11 -0
  201. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/return-request-headers.mmt +11 -0
  202. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/return-status-200.mmt +11 -0
  203. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/return-status-404.mmt +11 -0
  204. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/service-help.mmt +11 -0
  205. package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/set-cookie.mmt +11 -0
  206. package/dist/examples/professional/04_convert_to_mmt/http/README.md +7 -0
  207. package/dist/examples/professional/04_convert_to_mmt/http/converted/api/basic-auth-check.mmt +10 -0
  208. package/dist/examples/professional/04_convert_to_mmt/http/converted/api/bearer-auth-check.mmt +10 -0
  209. package/dist/examples/professional/04_convert_to_mmt/http/converted/api/cache-headers.mmt +9 -0
  210. package/dist/examples/professional/04_convert_to_mmt/http/converted/api/delayed-response.mmt +9 -0
  211. package/dist/examples/professional/04_convert_to_mmt/http/converted/api/echo-anything-alias.mmt +11 -0
  212. package/dist/examples/professional/04_convert_to_mmt/http/converted/api/echo-delete.mmt +9 -0
  213. package/dist/examples/professional/04_convert_to_mmt/http/converted/api/echo-get-with-query.mmt +10 -0
  214. package/dist/examples/professional/04_convert_to_mmt/http/converted/api/echo-post-body.mmt +13 -0
  215. package/dist/examples/professional/04_convert_to_mmt/http/converted/api/echo-put-body.mmt +14 -0
  216. package/dist/examples/professional/04_convert_to_mmt/http/converted/api/get-sample-html.mmt +9 -0
  217. package/dist/examples/professional/04_convert_to_mmt/http/converted/api/get-sample-json.mmt +9 -0
  218. package/dist/examples/professional/04_convert_to_mmt/http/converted/api/get-sample-xml.mmt +9 -0
  219. package/dist/examples/professional/04_convert_to_mmt/http/converted/api/method-match-get.mmt +9 -0
  220. package/dist/examples/professional/04_convert_to_mmt/http/converted/api/random-bytes.mmt +9 -0
  221. package/dist/examples/professional/04_convert_to_mmt/http/converted/api/redirect-twice.mmt +9 -0
  222. package/dist/examples/professional/04_convert_to_mmt/http/converted/api/return-client-ip.mmt +9 -0
  223. package/dist/examples/professional/04_convert_to_mmt/http/converted/api/return-cookies.mmt +9 -0
  224. package/dist/examples/professional/04_convert_to_mmt/http/converted/api/return-request-headers.mmt +10 -0
  225. package/dist/examples/professional/04_convert_to_mmt/http/converted/api/return-status-200.mmt +9 -0
  226. package/dist/examples/professional/04_convert_to_mmt/http/converted/api/return-status-404.mmt +9 -0
  227. package/dist/examples/professional/04_convert_to_mmt/http/converted/api/service-help.mmt +9 -0
  228. package/dist/examples/professional/04_convert_to_mmt/http/converted/api/set-cookie.mmt +9 -0
  229. package/dist/examples/professional/04_convert_to_mmt/http/converted/tests/source-http.mmt +95 -0
  230. package/dist/examples/professional/04_convert_to_mmt/openapi/README.md +8 -0
  231. package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/basic-auth-check.mmt +11 -0
  232. package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/bearer-auth-check.mmt +11 -0
  233. package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/cache-headers.mmt +7 -0
  234. package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/delayed-response.mmt +7 -0
  235. package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/echo-anything-alias.mmt +13 -0
  236. package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/echo-delete.mmt +7 -0
  237. package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/echo-get-with-query.mmt +11 -0
  238. package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/echo-post-body.mmt +36 -0
  239. package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/echo-put-body.mmt +25 -0
  240. package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/get-sample-html.mmt +7 -0
  241. package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/get-sample-json.mmt +7 -0
  242. package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/get-sample-xml.mmt +7 -0
  243. package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/method-match.mmt +7 -0
  244. package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/random-bytes.mmt +7 -0
  245. package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/redirect-n-times.mmt +7 -0
  246. package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/return-client-ip.mmt +7 -0
  247. package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/return-cookies.mmt +7 -0
  248. package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/return-request-headers.mmt +7 -0
  249. package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/return-status-code.mmt +7 -0
  250. package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/service-help.mmt +7 -0
  251. package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/set-cookie.mmt +9 -0
  252. package/dist/examples/professional/04_convert_to_mmt/postman/README.md +8 -0
  253. package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/auth/basic-auth-check.mmt +11 -0
  254. package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/auth/bearer-auth-check.mmt +10 -0
  255. package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/echo/echo-anything-alias.mmt +11 -0
  256. package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/echo/echo-delete.mmt +7 -0
  257. package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/echo/echo-get-with-query.mmt +8 -0
  258. package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/echo/echo-post-body.mmt +13 -0
  259. package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/echo/echo-put-body.mmt +14 -0
  260. package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/inspect/return-client-ip.mmt +7 -0
  261. package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/inspect/return-cookies.mmt +7 -0
  262. package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/inspect/return-request-headers.mmt +8 -0
  263. package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/inspect/set-cookie.mmt +7 -0
  264. package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/samples/get-sample-html.mmt +7 -0
  265. package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/samples/get-sample-json.mmt +28 -0
  266. package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/samples/get-sample-xml.mmt +7 -0
  267. package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/samples/random-bytes.mmt +7 -0
  268. package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/samples/service-help.mmt +7 -0
  269. package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/status/cache-headers.mmt +7 -0
  270. package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/status/delayed-response.mmt +7 -0
  271. package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/status/method-match-get.mmt +7 -0
  272. package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/status/redirect-twice.mmt +7 -0
  273. package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/status/return-status-200.mmt +7 -0
  274. package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/status/return-status-404.mmt +7 -0
  275. package/dist/examples/professional/04_convert_to_mmt/postman/converted/multimeter.mmt +11 -0
  276. package/dist/examples/professional/04_convert_to_mmt/postman/converted/suites/auth.mmt +7 -0
  277. package/dist/examples/professional/04_convert_to_mmt/postman/converted/suites/collection.mmt +15 -0
  278. package/dist/examples/professional/04_convert_to_mmt/postman/converted/suites/echo.mmt +7 -0
  279. package/dist/examples/professional/04_convert_to_mmt/postman/converted/suites/inspect.mmt +7 -0
  280. package/dist/examples/professional/04_convert_to_mmt/postman/converted/suites/samples.mmt +7 -0
  281. package/dist/examples/professional/04_convert_to_mmt/postman/converted/suites/status.mmt +7 -0
  282. package/dist/examples/professional/04_convert_to_mmt/postman/converted/tests/auth.mmt +15 -0
  283. package/dist/examples/professional/04_convert_to_mmt/postman/converted/tests/echo.mmt +27 -0
  284. package/dist/examples/professional/04_convert_to_mmt/postman/converted/tests/inspect.mmt +23 -0
  285. package/dist/examples/professional/04_convert_to_mmt/postman/converted/tests/samples.mmt +29 -0
  286. package/dist/examples/professional/04_convert_to_mmt/postman/converted/tests/status.mmt +31 -0
  287. package/dist/examples/professional/04_convert_to_mmt/wsdl/README.md +8 -0
  288. package/dist/examples/professional/04_convert_to_mmt/wsdl/converted/api/echomessage.mmt +23 -0
  289. package/dist/examples/professional/04_convert_to_mmt/wsdl/converted/api/getsamplexml.mmt +21 -0
  290. package/dist/examples/professional/04_convert_to_mmt/wsdl/converted/api/probestatus.mmt +21 -0
  291. package/dist/examples/professional/05_tls_mock_server/README.md +19 -0
  292. package/dist/examples/professional/05_tls_mock_server/api/secure_health.mmt +11 -0
  293. package/dist/examples/professional/05_tls_mock_server/multimeter.mmt +3 -0
  294. package/dist/examples/professional/05_tls_mock_server/server/mock_server.mmt +23 -0
  295. package/dist/examples/professional/05_tls_mock_server/test/secure_health_test.mmt +15 -0
  296. package/dist/examples/professional/06_mtls_mock_server/README.md +23 -0
  297. package/dist/examples/professional/06_mtls_mock_server/api/secure_health.mmt +11 -0
  298. package/dist/examples/professional/06_mtls_mock_server/multimeter.mmt +12 -0
  299. package/dist/examples/professional/06_mtls_mock_server/server/mock_server.mmt +24 -0
  300. package/dist/examples/professional/06_mtls_mock_server/test/secure_health_test.mmt +15 -0
  301. package/dist/examples/professional/07_mock_server_timeout/README.md +26 -0
  302. package/dist/examples/professional/07_mock_server_timeout/api/slow_request.mmt +10 -0
  303. package/dist/examples/professional/07_mock_server_timeout/server/mock_server.mmt +19 -0
  304. package/dist/examples/professional/07_mock_server_timeout/suite.mmt +7 -0
  305. package/dist/examples/professional/07_mock_server_timeout/test/slow_timeout_test.mmt +15 -0
  306. package/dist/examples/professional/08_external_mtls_badssl/README.md +52 -0
  307. package/dist/examples/professional/08_external_mtls_badssl/api/badssl_client.mmt +6 -0
  308. package/dist/examples/professional/08_external_mtls_badssl/badssl_mtls_test.mmt +10 -0
  309. package/dist/examples/professional/08_external_mtls_badssl/multimeter.mmt +13 -0
  310. package/dist/examples/professional/09_ci_pipelines/README.md +92 -0
  311. package/dist/examples/professional/09_ci_pipelines/smoke_get.mmt +9 -0
  312. package/dist/examples/professional/09_ci_pipelines/smoke_post.mmt +12 -0
  313. package/dist/examples/professional/09_ci_pipelines/suite.mmt +9 -0
  314. package/dist/examples/professional/10_vault_http_setenv/README.md +60 -0
  315. package/dist/examples/professional/10_vault_http_setenv/api/bearer_with_env_token.mmt +16 -0
  316. package/dist/examples/professional/10_vault_http_setenv/api/vault_kv_read.mmt +22 -0
  317. package/dist/examples/professional/10_vault_http_setenv/env.mmt +21 -0
  318. package/dist/examples/professional/10_vault_http_setenv/server/vault_kv_mock.mmt +45 -0
  319. package/dist/examples/professional/10_vault_http_setenv/vault_to_api_test.mmt +22 -0
  320. package/dist/guides/agent-workflow.md +75 -0
  321. package/dist/guides/general.md +64 -0
  322. package/dist/guides/generate-api.md +221 -0
  323. package/dist/guides/generate-doc.md +103 -0
  324. package/dist/guides/generate-env.md +147 -0
  325. package/dist/guides/generate-loadtest.md +55 -0
  326. package/dist/guides/generate-suite.md +167 -0
  327. package/dist/guides/generate-test-skill.md +60 -0
  328. package/dist/guides/generate-test.md +335 -0
  329. package/dist/guides/generate.md +60 -0
  330. package/dist/guides/golden-smoke.md +52 -0
  331. package/dist/guides/min/api.md +29 -0
  332. package/dist/guides/min/constraints.md +9 -0
  333. package/dist/guides/min/doc.md +17 -0
  334. package/dist/guides/min/env.md +26 -0
  335. package/dist/guides/min/loadtest.md +17 -0
  336. package/dist/guides/min/overview.md +25 -0
  337. package/dist/guides/min/suite.md +18 -0
  338. package/dist/guides/min/test.md +42 -0
  339. package/dist/guides/min/workflow.md +16 -0
  340. package/dist/guides/offline-agent.md +46 -0
  341. package/dist/server.cjs +27500 -0
  342. package/dist/server.js +27500 -0
  343. package/package.json +58 -0
@@ -0,0 +1,24 @@
1
+ type: test
2
+ title: Control Flow — repeat and delay
3
+ description: Demonstrates repeat (count-based and time-based) and delay steps
4
+ import:
5
+ echo: ./api/echo.mmt
6
+ steps:
7
+ - print: Starting repeat 3 times...
8
+ - repeat: 3
9
+ steps:
10
+ - call: echo
11
+ id: poll
12
+ inputs:
13
+ message: polling
14
+ - check: ${poll.status_code} == 200
15
+ - delay: 500
16
+ - print: Starting time-based repeat for 3 seconds...
17
+ - repeat: 3s
18
+ steps:
19
+ - call: echo
20
+ id: tick
21
+ inputs:
22
+ message: Hi
23
+ - delay: 1s
24
+ - print: All repeats completed
@@ -0,0 +1,59 @@
1
+ # Random Values
2
+
3
+ Demonstrates built-in `r:xxx` tokens in YAML files. These tokens generate random values at runtime without needing a `js` step.
4
+
5
+ ## Structure
6
+
7
+ ```
8
+ 12_random_values/
9
+ ├── api/
10
+ │ └── random_echo.mmt # API using random tokens in the request body
11
+ ├── random_values_test.mmt # Test that calls the API and validates the echoed values
12
+ └── README.md
13
+ ```
14
+
15
+ ## Files
16
+
17
+ | File | Description |
18
+ |---|---|
19
+ | `api/random_echo.mmt` | Sends random UUID, email, first name, integer, and boolean values |
20
+ | `random_values_test.mmt` | Calls the API and checks that the generated values were echoed back |
21
+
22
+ ## Example tokens
23
+
24
+ ```yaml
25
+ body:
26
+ id: r:uuid
27
+ email: r:email
28
+ name: r:first_name
29
+ lucky_number: r:int
30
+ active: r:bool
31
+ request_id: req-<<r:uuid>>
32
+ ```
33
+
34
+ ## Key concepts
35
+
36
+ - **Standalone `r:xxx` values** keep their native type. For example, `r:int` becomes a number and `r:bool` becomes a boolean.
37
+ - **Embedded tokens** must use `<< >>`. In this example, `req-<<r:uuid>>` generates a string with a random suffix.
38
+ - **No JS required** — random values can be used directly in API `body`, `headers`, `query`, `cookies`, `url`, and input defaults.
39
+ - **Inline `expect`** checks the echoed values without adding separate `assert` or `check` steps.
40
+
41
+ ## How to use
42
+
43
+ ### In VS Code
44
+
45
+ 1. Open `random_values_test.mmt`.
46
+ 2. Click **Run** to execute the test.
47
+ 3. Inspect the response to see the generated values change on each run.
48
+
49
+ ### With the CLI
50
+
51
+ ```sh
52
+ npx testlight run examples/intermediate/12_random_values/random_values_test.mmt
53
+ ```
54
+
55
+ ## Next steps
56
+
57
+ - See [Simple Mock Server](../18_simple_mock_server/) for random tokens in mock server responses.
58
+ - See [JavaScript Helpers](../14_javascript_helpers/) for the JavaScript `Random.*` helpers.
59
+ - See [API docs](../../../docs/files/api/index.md) for the full list of supported random tokens.
@@ -0,0 +1,21 @@
1
+ type: api
2
+ title: Random Echo
3
+ description: Sends random YAML tokens and extracts the echoed values from the response
4
+ outputs:
5
+ random_id: body.body.id
6
+ random_email: body.body.email
7
+ random_name: body.body.name
8
+ lucky_number: body.body.lucky_number
9
+ active: body.body.active
10
+ request_id: body.body.request_id
11
+ request_method: body.method
12
+ url: https://test.mmt.dev/echo
13
+ method: post
14
+ format: json
15
+ body:
16
+ id: r:uuid
17
+ email: r:email
18
+ name: r:first_name
19
+ lucky_number: r:int
20
+ active: r:bool
21
+ request_id: req-<<r:uuid>>
@@ -0,0 +1,15 @@
1
+ type: test
2
+ title: Random Values
3
+ description: Calls an API that uses r:xxx tokens and validates the echoed results
4
+ import:
5
+ randomEcho: ./api/random_echo.mmt
6
+ steps:
7
+ - call: randomEcho
8
+ id: result
9
+ expect:
10
+ request_method: POST
11
+ random_id: != null
12
+ random_email: =* [a-z._]+@[a-z]+\.[a-z]+
13
+ random_name: != null
14
+ lucky_number: != null
15
+ request_id: =^ req-
@@ -0,0 +1,58 @@
1
+ # Stages and Conditions
2
+
3
+ Demonstrates **parallel stages** with `after` dependencies and **conditional stage execution** using `condition`.
4
+
5
+ ## Structure
6
+
7
+ ```
8
+ 13_stages_and_conditions/
9
+ ├── api/
10
+ │ ├── login.mmt # Login API
11
+ │ ├── get_profile.mmt # Profile API
12
+ │ └── get_settings.mmt # Settings API
13
+ ├── stages_test.mmt # Test with parallel stages, after, and condition
14
+ └── README.md
15
+ ```
16
+
17
+ ## Files
18
+
19
+ | File | Description |
20
+ |---|---|
21
+ | `api/login.mmt` | Simulates login, outputs a token |
22
+ | `api/get_profile.mmt` | Fetches profile using a token |
23
+ | `api/get_settings.mmt` | Fetches settings using a token |
24
+ | `stages_test.mmt` | Three stages: `auth` runs first, then `profile` and `settings` run in parallel after auth succeeds |
25
+
26
+ ## Execution flow
27
+
28
+ ```
29
+ auth (login)
30
+ ├── condition met ──► profile ┐
31
+ │ ├── run in parallel
32
+ └── condition met ──► settings ┘
33
+ ```
34
+
35
+ 1. **auth** stage runs first (login).
36
+ 2. **profile** and **settings** both have `after: auth` — they wait for auth to finish.
37
+ 3. Both have `condition: doLogin.status_code == 200` — they are skipped if login fails.
38
+ 4. Once auth passes, profile and settings run **in parallel**.
39
+
40
+ ## Key concepts
41
+
42
+ - **`stages`** — groups of steps that start concurrently by default.
43
+ - **`after`** — declares a dependency so the stage waits for another stage to complete first. Can be a single string or an array.
44
+ - **`condition`** — skips the stage if the expression is false. Uses the same syntax as `assert`/`check`.
45
+ - **Parallelism** — stages without `after` dependencies run simultaneously. Stages with the same `after` also run in parallel with each other.
46
+
47
+ ## How to use
48
+
49
+ ### In VS Code
50
+
51
+ 1. Open `stages_test.mmt` and click **Run**.
52
+ 2. The Flow panel shows the stage graph with dependencies.
53
+
54
+ ### With the CLI
55
+
56
+ ```sh
57
+ npx testlight run examples/intermediate/13_stages_and_conditions/stages_test.mmt
58
+ ```
@@ -0,0 +1,13 @@
1
+ type: api
2
+ title: Get Profile
3
+ description: Fetches a user profile
4
+ inputs:
5
+ token: placeholder
6
+ outputs:
7
+ status_code: status
8
+ name: body.body.token
9
+ url: https://test.mmt.dev/echo
10
+ method: post
11
+ format: json
12
+ body:
13
+ token: i:token
@@ -0,0 +1,13 @@
1
+ type: api
2
+ title: Get Settings
3
+ description: Fetches user settings
4
+ inputs:
5
+ token: placeholder
6
+ outputs:
7
+ status_code: status
8
+ theme: body.body.token
9
+ url: https://test.mmt.dev/echo
10
+ method: post
11
+ format: json
12
+ body:
13
+ token: i:token
@@ -0,0 +1,15 @@
1
+ type: api
2
+ title: Login API
3
+ description: Simulates login and returns a token
4
+ inputs:
5
+ username: alice
6
+ password: secret
7
+ outputs:
8
+ status_code: status
9
+ token: body.body.username
10
+ url: https://test.mmt.dev/echo
11
+ method: post
12
+ format: json
13
+ body:
14
+ username: i:username
15
+ password: i:password
@@ -0,0 +1,40 @@
1
+ type: test
2
+ title: Stages and Conditions
3
+ description: Demonstrates parallel stages with after dependencies and conditional execution
4
+ import:
5
+ login: ./api/login.mmt
6
+ getProfile: ./api/get_profile.mmt
7
+ getSettings: ./api/get_settings.mmt
8
+ stages:
9
+ - id: auth
10
+ title: Authentication
11
+ steps:
12
+ - call: login
13
+ id: doLogin
14
+ inputs:
15
+ username: alice
16
+ password: secret
17
+ expect:
18
+ status_code: 200
19
+ - id: profile
20
+ title: Fetch Profile
21
+ condition: ${doLogin.status_code} == 200
22
+ after: auth
23
+ steps:
24
+ - call: getProfile
25
+ id: userProfile
26
+ inputs:
27
+ token: ${doLogin.token}
28
+ expect:
29
+ status_code: 200
30
+ - id: settings
31
+ title: Fetch Settings
32
+ condition: ${doLogin.status_code} == 200
33
+ after: auth
34
+ steps:
35
+ - call: getSettings
36
+ id: userSettings
37
+ inputs:
38
+ token: ${doLogin.token}
39
+ expect:
40
+ status_code: 200
@@ -0,0 +1,59 @@
1
+ # JavaScript Helpers
2
+
3
+ Demonstrates **`js` steps**, **imported JS helpers**, and **runner globals** like `Random.*`, `setenv_()`, and `report_()`.
4
+
5
+ ## Structure
6
+
7
+ ```
8
+ 14_javascript_helpers/
9
+ ├── helpers/
10
+ │ └── helpers.js # Plain JS functions (auto-exported)
11
+ ├── api/
12
+ │ └── echo.mmt # Simple echo API
13
+ ├── js_test.mmt # Test using js steps and imported helpers
14
+ └── README.md
15
+ ```
16
+
17
+ ## Files
18
+
19
+ | File | Description |
20
+ |---|---|
21
+ | `helpers/helpers.js` | Top-level functions `greet()`, `sum()`, and `formatDate()` |
22
+ | `api/echo.mmt` | Echo API used for validation |
23
+ | `js_test.mmt` | Test that imports the JS file and uses runner globals in `js` steps |
24
+
25
+ ## Key concepts
26
+
27
+ - **JS helper import** — import `.js`/`.cjs`/`.mjs` files in the `import` section. They are loaded once per run.
28
+ ```yaml
29
+ import:
30
+ helpers: ./helpers/helpers.js
31
+ ```
32
+ - **Plain functions** — write normal top-level functions (or `const fn = () => {}`). Multimeter exposes them on the import alias automatically. `module.exports = { ... }` still works if you prefer it.
33
+ - **`js` step** — inline JavaScript block. Has access to all imports and runner globals.
34
+ ```yaml
35
+ - js: |
36
+ const greeting = helpers.greet('World');
37
+ ```
38
+ - **Runner globals** available in `js` steps:
39
+
40
+ | Global | Description |
41
+ |--------|-------------|
42
+ | `Random.*` | `randomUUID()`, `randomEmail()`, `randomInt()`, etc. |
43
+ | `setenv_(vars)` | Set environment variables at runtime from an object |
44
+ | `report_(type, comparison, title, details, passed)` | Emit a check/assert result |
45
+ | `console.log/warn/error` | Log to the output panel |
46
+ | `send_(request)` | Send an HTTP request directly |
47
+
48
+ ## How to use
49
+
50
+ ### In VS Code
51
+
52
+ 1. Open `js_test.mmt` and click **Run**.
53
+ 2. The Log panel shows `console.log` output and the custom `report_` check result.
54
+
55
+ ### With the CLI
56
+
57
+ ```sh
58
+ npx testlight run examples/intermediate/14_javascript_helpers/js_test.mmt
59
+ ```
@@ -0,0 +1,13 @@
1
+ type: api
2
+ title: Echo API
3
+ description: Simple echo for JS helper tests
4
+ inputs:
5
+ message: hello
6
+ outputs:
7
+ status_code: status
8
+ echoed: body.body.message
9
+ url: https://test.mmt.dev/echo
10
+ method: post
11
+ format: json
12
+ body:
13
+ message: i:message
@@ -0,0 +1,31 @@
1
+ type: test
2
+ title: JavaScript Helpers
3
+ description: Demonstrates js steps, imported JS modules, and runner globals
4
+ import:
5
+ helpers: ./helpers/helpers.js
6
+ echo: ./api/echo.mmt
7
+ steps:
8
+ # Use an imported JS module function
9
+ - js: |
10
+ const greeting = helpers.greet('Multimeter');
11
+ console.log('Greeting:', greeting);
12
+
13
+ # Use runner globals: Random functions
14
+ - js: |
15
+ const randomId = Random.randomUUID();
16
+ const randomEmail = Random.randomEmail();
17
+ console.log('Random UUID:', randomId);
18
+ console.log('Random email:', randomEmail);
19
+
20
+ # Use setenv_ to promote a value to an env variable
21
+ - js: |
22
+ const token = Random.randomUUID();
23
+ setenv_({ DYNAMIC_TOKEN: token });
24
+ console.log('Set DYNAMIC_TOKEN to:', token);
25
+
26
+ # Use the helpers module for computation
27
+ - js: |
28
+ const total = helpers.sum([10, 20, 30]);
29
+ console.log('Sum:', total);
30
+ const now = helpers.formatDate(Date.now());
31
+ console.log('Current time:', now);
@@ -0,0 +1,25 @@
1
+ # HTTP file examples
2
+
3
+ These examples show `.http` files that can be opened through **Open With...** → **Multimeter HTTP Test Editor**, or **Open as MMT**.
4
+
5
+ The header has a selector and **Save as MMT**. **All** runs every request as one test; pick a request to Send it. The Test and API UIs are the same as for `.mmt` files.
6
+
7
+ All live requests target the public [test.mmt.dev](https://test.mmt.dev) test server.
8
+
9
+ ## Files
10
+
11
+ - `auth_user_flow.http`: login, create user, verify bearer auth, update user, and delete user flow with captured variables.
12
+ - `echo_posts.http`: create, fetch, search, and delete post flow using echo and status endpoints on test.mmt.dev.
13
+ - `import_http_in_test.mmt`: a Multimeter test that imports a `.http` file and calls it like any other test import.
14
+
15
+ ## Importing HTTP files from MMT
16
+
17
+ `.http` and `.https` files can be imported from `type: test` files. Multimeter converts them to test flows internally, so a normal `call` step can run the HTTP file.
18
+
19
+ ```yaml
20
+ type: test
21
+ import:
22
+ posts: echo_posts.http
23
+ steps:
24
+ - call: posts
25
+ ```
@@ -0,0 +1,8 @@
1
+ type: test
2
+ title: Import HTTP file in test
3
+ description: Runs an imported .http file as a normal test call.
4
+ import:
5
+ posts: echo_posts.http
6
+ steps:
7
+ - call: posts
8
+ title: Run echo HTTP flow
@@ -0,0 +1,36 @@
1
+ # Bruno file examples
2
+
3
+ These examples show `.bru` files that can be opened through **Open With...** → **Multimeter Bruno Test Editor**, or **Open as MMT**.
4
+
5
+ Use {{btn:list-tree}} in the header to pick **All** (one test) or a single request (API **Send**). See [Spec editor](../../docs/integration/spec-editor.md) for the full picker guide. Hover a row for {{btn:save-as}}.
6
+
7
+ ## Files
8
+
9
+ - `library/`: a Bruno collection (`bruno.json` plus several request files). Open `bruno.json` for the full collection, or any `.bru` for that request alone.
10
+ - `checkout_book_complete.bru`: one complete standalone request with meta, docs, vars, headers, query params, bearer auth, a JSON body, and several `expect` checks.
11
+ - `get_profile.bru`: a simple Bruno GET request with variables, headers, bearer auth, query params, and assertions.
12
+ - `create_user_json.bru`: a POST request with a JSON body and bearer auth.
13
+ - `update_profile_form.bru`: a PUT request with a form-urlencoded body.
14
+ - `xml_echo.bru`: a POST request with an XML text body.
15
+ - `import_bruno_in_test.mmt`: a Multimeter test that imports a `.bru` file and calls it like any other test import.
16
+
17
+ ## Importing Bruno Files From MMT
18
+
19
+ `.bru` files can be imported from `type: test` files. Multimeter converts them to test flows internally, so a normal `call` step can run the Bruno request.
20
+
21
+ ```yaml
22
+ type: test
23
+ title: Import Bruno request
24
+ import:
25
+ profile: get_profile.bru
26
+ createUser: create_user_json.bru
27
+ updateProfile: update_profile_form.bru
28
+ xmlEcho: xml_echo.bru
29
+ checkout: checkout_book_complete.bru
30
+ steps:
31
+ - call: profile
32
+ - call: createUser
33
+ - call: updateProfile
34
+ - call: xmlEcho
35
+ - call: checkout
36
+ ```
@@ -0,0 +1,18 @@
1
+ type: test
2
+ title: Import Bruno request
3
+ description: Run a Bruno .bru request through a Multimeter test flow.
4
+ tags: [bruno, import]
5
+
6
+ import:
7
+ profile: get_profile.bru
8
+ createUser: create_user_json.bru
9
+ updateProfile: update_profile_form.bru
10
+ xmlEcho: xml_echo.bru
11
+ checkout: checkout_book_complete.bru
12
+
13
+ steps:
14
+ - call: profile
15
+ - call: createUser
16
+ - call: updateProfile
17
+ - call: xmlEcho
18
+ - call: checkout
@@ -0,0 +1,8 @@
1
+ # Library Bruno collection
2
+
3
+ A small Bruno collection (`bruno.json` plus one `.bru` file per request).
4
+
5
+ - Open **`bruno.json`** with **Open as MMT** to run the whole collection (**All** as one test) or pick any request from the selector.
6
+ - Open a single **`.bru`** to work with that request only (test + API). Sibling requests are not listed.
7
+
8
+ All requests hit [test.mmt.dev](https://test.mmt.dev).
@@ -0,0 +1,35 @@
1
+ # API Authentication
2
+
3
+ Examples of `type: api` files that add authentication to requests.
4
+
5
+ ## Files
6
+
7
+ | File | Description |
8
+ |---|---|
9
+ | `get_with_basic_auth.mmt` | Sends a GET request with Basic username/password authentication |
10
+ | `get_with_bearer_auth.mmt` | Sends a GET request with a Bearer token |
11
+ | `get_with_apikey_auth.mmt` | Sends a GET request with an API key in a custom header |
12
+
13
+ ## How to use
14
+
15
+ ### In VS Code
16
+
17
+ 1. Open any `.mmt` file in this folder.
18
+ 2. Click **Run** in the editor to execute the API call.
19
+ 3. Inspect the request headers in the output panel.
20
+
21
+ ### With the CLI
22
+
23
+ ```sh
24
+ npx testlight run examples/intermediate/17_api_authentication/get_with_basic_auth.mmt
25
+ npx testlight run examples/intermediate/17_api_authentication/get_with_bearer_auth.mmt
26
+ npx testlight run examples/intermediate/17_api_authentication/get_with_apikey_auth.mmt
27
+ ```
28
+
29
+ ## Key concepts
30
+
31
+ - **Basic auth** sends a username and password as an Authorization header.
32
+ - **Bearer auth** sends a token as an Authorization header.
33
+ - **API key auth** sends a configured key in a configured header.
34
+
35
+ See [API docs](../../../docs/files/api/index.md) for the full `.mmt` API reference.
@@ -0,0 +1,10 @@
1
+ type: api
2
+ title: Get with API key auth
3
+ description: Sends a GET request with an API key in a custom header
4
+ url: https://test.mmt.dev/echo
5
+ method: get
6
+ format: json
7
+ auth:
8
+ type: api-key
9
+ header: X-API-Key
10
+ value: abc123def456
@@ -0,0 +1,10 @@
1
+ type: api
2
+ title: Get with Basic auth
3
+ description: Sends a GET request with Basic username/password authentication
4
+ url: https://test.mmt.dev/echo
5
+ method: get
6
+ format: json
7
+ auth:
8
+ type: basic
9
+ username: admin
10
+ password: secret123
@@ -0,0 +1,9 @@
1
+ type: api
2
+ title: Get with Bearer auth
3
+ description: Sends a GET request with Bearer token authentication
4
+ url: https://test.mmt.dev/echo
5
+ method: get
6
+ format: json
7
+ auth:
8
+ type: bearer
9
+ token: my-secret-token
@@ -0,0 +1,92 @@
1
+ # Simple Mock Server
2
+
3
+ A self-contained example that defines a mock server in an `.mmt` file and runs tests against it — covering **GET** and **POST** requests with and without parameters.
4
+
5
+ ## Structure
6
+
7
+ ```
8
+ 18_simple_mock_server/
9
+ ├── server/
10
+ │ └── mock_server.mmt # Mock server definition (type: server)
11
+ ├── api/
12
+ │ ├── get_health.mmt # GET /health — no parameters
13
+ │ ├── get_user.mmt # GET /users/:id — path parameter
14
+ │ ├── create_user.mmt # POST /users — JSON body
15
+ │ └── search.mmt # GET /search?q=... — query parameter
16
+ ├── test/
17
+ │ ├── health_test.mmt # Test the health endpoint
18
+ │ ├── user_test.mmt # Test GET and POST user endpoints
19
+ │ └── search_test.mmt # Test the search endpoint
20
+ ├── suite.mmt # Suite that starts the server and runs all tests
21
+ └── README.md
22
+ ```
23
+
24
+ ## Files
25
+
26
+ ### Server
27
+
28
+ | File | Description |
29
+ |---|---|
30
+ | `server/mock_server.mmt` | Defines a mock server on port 9099 with HTTP endpoints |
31
+
32
+ ### APIs
33
+
34
+ | File | Method | Path | Parameters |
35
+ |---|---|---|---|
36
+ | `api/get_health.mmt` | GET | `/health` | None |
37
+ | `api/get_user.mmt` | GET | `/users/:id` | Path param `user_id` |
38
+ | `api/create_user.mmt` | POST | `/users` | JSON body (`name`, `email`) |
39
+ | `api/search.mmt` | GET | `/search?q=...` | Query param `q` |
40
+
41
+ ### Tests
42
+
43
+ | File | Description |
44
+ |---|---|
45
+ | `test/health_test.mmt` | Starts the server, calls GET `/health`, asserts `status == ok` |
46
+ | `test/user_test.mmt` | Starts the server, fetches a user by ID, creates a user via POST, asserts fields |
47
+ | `test/search_test.mmt` | Starts the server, calls GET `/search` with a query param, asserts response |
48
+
49
+ ### Suite
50
+
51
+ | File | Description |
52
+ |---|---|
53
+ | `suite.mmt` | Uses `servers:` to start the mock server, then runs all three tests in parallel |
54
+
55
+ ## Key concepts
56
+
57
+ - **`type: server`** — defines a mock server with endpoints, a port, and optional fallback/CORS/delay settings.
58
+ - **`run` step in tests** — starts the mock server before making API calls. If the server is already running, `run` is a no-op.
59
+ - **Path parameters** — use `:param` in server endpoint paths (e.g. `/users/:id`); reference them in the response body with `"${url.id}"`.
60
+ - **Request echo** — use `${body.field}`, `${header.name}`, and `${query.param}` to echo parsed request data back in responses.
61
+ - **Dynamic tokens** — `r:uuid` generates a random UUID, `c:date` inserts the current date.
62
+ - **Fallback** — any request that doesn't match an endpoint returns the fallback response (404 in this example).
63
+
64
+ ## How to use
65
+
66
+ ### In VS Code
67
+
68
+ 1. Open any test file (e.g. `test/health_test.mmt`) and click **Run**.
69
+ The test starts the mock server automatically via the `run` step, calls the API, and checks the result.
70
+ 2. Or open `suite.mmt` and click **Run** to execute all tests at once.
71
+
72
+ ### With the CLI
73
+
74
+ Run individual tests:
75
+
76
+ ```sh
77
+ npx testlight run examples/intermediate/18_simple_mock_server/test/health_test.mmt
78
+ npx testlight run examples/intermediate/18_simple_mock_server/test/user_test.mmt
79
+ npx testlight run examples/intermediate/18_simple_mock_server/test/search_test.mmt
80
+ ```
81
+
82
+ Run the full suite:
83
+
84
+ ```sh
85
+ npx testlight run examples/intermediate/18_simple_mock_server/suite.mmt
86
+ ```
87
+
88
+ Override inputs:
89
+
90
+ ```sh
91
+ npx testlight run examples/intermediate/18_simple_mock_server/test/user_test.mmt -e user_id=99
92
+ ```
@@ -0,0 +1,15 @@
1
+ type: api
2
+ title: Create User
3
+ description: POST request to create a new user
4
+ inputs:
5
+ name: Alice
6
+ email: alice@example.com
7
+ outputs:
8
+ id: body.id
9
+ message: body.message
10
+ url: http://localhost:9099/users
11
+ method: post
12
+ format: json
13
+ body:
14
+ name: i:name
15
+ email: i:email
@@ -0,0 +1,9 @@
1
+ type: api
2
+ title: Health Check
3
+ description: GET request to the health endpoint (no parameters)
4
+ outputs:
5
+ status_field: body.status
6
+ uptime: body.uptime
7
+ url: http://localhost:9099/health
8
+ method: get
9
+ format: json