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.
- package/README.md +22 -0
- package/dist/examples/README.md +19 -0
- package/dist/examples/ai/golden_smoke/README.md +8 -0
- package/dist/examples/ai/golden_smoke/apis/echo.mmt +12 -0
- package/dist/examples/ai/golden_smoke/tests/echo-smoke.mmt +18 -0
- package/dist/examples/basic/01_simple_api/README.md +38 -0
- package/dist/examples/basic/01_simple_api/get_json.mmt +6 -0
- package/dist/examples/basic/01_simple_api/post_echo_json_body.mmt +13 -0
- package/dist/examples/basic/01_simple_api/post_echo_yaml_body.mmt +11 -0
- package/dist/examples/basic/02_simple_test/README.md +35 -0
- package/dist/examples/basic/02_simple_test/echo_test.mmt +12 -0
- package/dist/examples/basic/03_environment_variables/README.md +40 -0
- package/dist/examples/basic/03_environment_variables/get_json.mmt +6 -0
- package/dist/examples/basic/03_environment_variables/multimeter.mmt +3 -0
- package/dist/examples/basic/04_basic_suite/README.md +33 -0
- package/dist/examples/basic/04_basic_suite/suite.mmt +6 -0
- package/dist/examples/basic/04_basic_suite/tests/get_status_test.mmt +9 -0
- package/dist/examples/basic/04_basic_suite/tests/post_echo_test.mmt +12 -0
- package/dist/examples/basic/05_basic_documentation/README.md +24 -0
- package/dist/examples/basic/05_basic_documentation/api/get_user.mmt +12 -0
- package/dist/examples/basic/05_basic_documentation/document.mmt +4 -0
- package/dist/examples/examples-index.json +1559 -0
- package/dist/examples/intermediate/01_api_inputs_outputs/README.md +46 -0
- package/dist/examples/intermediate/01_api_inputs_outputs/get_dot_notation.mmt +14 -0
- package/dist/examples/intermediate/01_api_inputs_outputs/get_with_outputs.mmt +10 -0
- package/dist/examples/intermediate/01_api_inputs_outputs/post_regex_outputs.mmt +24 -0
- package/dist/examples/intermediate/01_api_inputs_outputs/post_with_inputs_outputs.mmt +20 -0
- package/dist/examples/intermediate/02_websocket/README.md +44 -0
- package/dist/examples/intermediate/02_websocket/ws_echo.mmt +11 -0
- package/dist/examples/intermediate/02_websocket/ws_json_echo.mmt +16 -0
- package/dist/examples/intermediate/03_graphql/README.md +10 -0
- package/dist/examples/intermediate/03_graphql/graphql_query.mmt +16 -0
- package/dist/examples/intermediate/03_graphql/graphql_variables.mmt +25 -0
- package/dist/examples/intermediate/04_grpc/README.md +10 -0
- package/dist/examples/intermediate/04_grpc/grpc_server_stream.mmt +15 -0
- package/dist/examples/intermediate/04_grpc/grpc_unary.mmt +13 -0
- package/dist/examples/intermediate/05_api_documentation/README.md +33 -0
- package/dist/examples/intermediate/05_api_documentation/api/get_users.mmt +13 -0
- package/dist/examples/intermediate/05_api_documentation/api/post_create_user.mmt +25 -0
- package/dist/examples/intermediate/05_api_documentation/api/ws_notifications.mmt +18 -0
- package/dist/examples/intermediate/05_api_documentation/document.mmt +17 -0
- package/dist/examples/intermediate/05_api_documentation/markdown_api/health_check.mmt +6 -0
- package/dist/examples/intermediate/05_api_documentation/markdown_api/overview.md +77 -0
- package/dist/examples/intermediate/05_api_documentation/markdown_api/search_products.mmt +15 -0
- package/dist/examples/intermediate/05_api_documentation/markdown_api/submit_order.mmt +18 -0
- package/dist/examples/intermediate/06_imports/README.md +92 -0
- package/dist/examples/intermediate/06_imports/apis/echo_api.mmt +13 -0
- package/dist/examples/intermediate/06_imports/apis/greet_api.mmt +13 -0
- package/dist/examples/intermediate/06_imports/multimeter.mmt +5 -0
- package/dist/examples/intermediate/06_imports/test_relative.mmt +15 -0
- package/dist/examples/intermediate/06_imports/test_root_import.mmt +14 -0
- package/dist/examples/intermediate/06_imports/tests/test_api.mmt +30 -0
- package/dist/examples/intermediate/07_simple_suite/README.md +56 -0
- package/dist/examples/intermediate/07_simple_suite/api/echo_api.mmt +12 -0
- package/dist/examples/intermediate/07_simple_suite/api/status_api.mmt +8 -0
- package/dist/examples/intermediate/07_simple_suite/suite_parallel.mmt +11 -0
- package/dist/examples/intermediate/07_simple_suite/suite_sequential.mmt +14 -0
- package/dist/examples/intermediate/07_simple_suite/test/echo_test.mmt +16 -0
- package/dist/examples/intermediate/07_simple_suite/test/echo_test_fail.mmt +15 -0
- package/dist/examples/intermediate/07_simple_suite/test/status_test.mmt +11 -0
- package/dist/examples/intermediate/07_simple_suite/test/status_test_fail.mmt +11 -0
- package/dist/examples/intermediate/08_chained_api_calls/README.md +58 -0
- package/dist/examples/intermediate/08_chained_api_calls/api/get_profile.mmt +15 -0
- package/dist/examples/intermediate/08_chained_api_calls/api/login.mmt +17 -0
- package/dist/examples/intermediate/08_chained_api_calls/chained_test.mmt +31 -0
- package/dist/examples/intermediate/09_csv_data_driven_test/README.md +80 -0
- package/dist/examples/intermediate/09_csv_data_driven_test/echo_api.mmt +14 -0
- package/dist/examples/intermediate/09_csv_data_driven_test/echo_csv_test.mmt +18 -0
- package/dist/examples/intermediate/10_environment_presets/README.md +58 -0
- package/dist/examples/intermediate/10_environment_presets/api/echo_env.mmt +14 -0
- package/dist/examples/intermediate/10_environment_presets/multimeter.mmt +22 -0
- package/dist/examples/intermediate/10_environment_presets/test/preset_test.mmt +14 -0
- package/dist/examples/intermediate/11_control_flow/README.md +48 -0
- package/dist/examples/intermediate/11_control_flow/api/echo.mmt +13 -0
- package/dist/examples/intermediate/11_control_flow/for_loop_test.mmt +15 -0
- package/dist/examples/intermediate/11_control_flow/if_else_test.mmt +19 -0
- package/dist/examples/intermediate/11_control_flow/repeat_delay_test.mmt +24 -0
- package/dist/examples/intermediate/12_random_values/README.md +59 -0
- package/dist/examples/intermediate/12_random_values/api/random_echo.mmt +21 -0
- package/dist/examples/intermediate/12_random_values/random_values_test.mmt +15 -0
- package/dist/examples/intermediate/13_stages_and_conditions/README.md +58 -0
- package/dist/examples/intermediate/13_stages_and_conditions/api/get_profile.mmt +13 -0
- package/dist/examples/intermediate/13_stages_and_conditions/api/get_settings.mmt +13 -0
- package/dist/examples/intermediate/13_stages_and_conditions/api/login.mmt +15 -0
- package/dist/examples/intermediate/13_stages_and_conditions/stages_test.mmt +40 -0
- package/dist/examples/intermediate/14_javascript_helpers/README.md +59 -0
- package/dist/examples/intermediate/14_javascript_helpers/api/echo.mmt +13 -0
- package/dist/examples/intermediate/14_javascript_helpers/js_test.mmt +31 -0
- package/dist/examples/intermediate/15_http_files/README.md +25 -0
- package/dist/examples/intermediate/15_http_files/import_http_in_test.mmt +8 -0
- package/dist/examples/intermediate/16_bruno_files/README.md +36 -0
- package/dist/examples/intermediate/16_bruno_files/import_bruno_in_test.mmt +18 -0
- package/dist/examples/intermediate/16_bruno_files/library/README.md +8 -0
- package/dist/examples/intermediate/17_api_authentication/README.md +35 -0
- package/dist/examples/intermediate/17_api_authentication/get_with_apikey_auth.mmt +10 -0
- package/dist/examples/intermediate/17_api_authentication/get_with_basic_auth.mmt +10 -0
- package/dist/examples/intermediate/17_api_authentication/get_with_bearer_auth.mmt +9 -0
- package/dist/examples/intermediate/18_simple_mock_server/README.md +92 -0
- package/dist/examples/intermediate/18_simple_mock_server/api/create_user.mmt +15 -0
- package/dist/examples/intermediate/18_simple_mock_server/api/get_health.mmt +9 -0
- package/dist/examples/intermediate/18_simple_mock_server/api/get_user.mmt +12 -0
- package/dist/examples/intermediate/18_simple_mock_server/api/search.mmt +11 -0
- package/dist/examples/intermediate/18_simple_mock_server/server/mock_server.mmt +46 -0
- package/dist/examples/intermediate/18_simple_mock_server/suite.mmt +12 -0
- package/dist/examples/intermediate/18_simple_mock_server/test/health_test.mmt +13 -0
- package/dist/examples/intermediate/18_simple_mock_server/test/search_test.mmt +15 -0
- package/dist/examples/intermediate/18_simple_mock_server/test/user_test.mmt +27 -0
- package/dist/examples/intermediate/19_environment_post_echo/README.md +33 -0
- package/dist/examples/intermediate/19_environment_post_echo/multimeter.mmt +4 -0
- package/dist/examples/intermediate/19_environment_post_echo/post_echo.mmt +12 -0
- package/dist/examples/intermediate/20_document_parameters/README.md +25 -0
- package/dist/examples/intermediate/20_document_parameters/api/search_users.mmt +28 -0
- package/dist/examples/intermediate/20_document_parameters/document.mmt +6 -0
- package/dist/examples/intermediate/21_manual_timeout/README.md +22 -0
- package/dist/examples/intermediate/21_manual_timeout/manual_timeout.mmt +11 -0
- package/dist/examples/intermediate/22_omit_keyword/README.md +45 -0
- package/dist/examples/intermediate/22_omit_keyword/omit_keyword.mmt +34 -0
- package/dist/examples/intermediate/22_omit_keyword/omit_keyword_test.mmt +19 -0
- package/dist/examples/intermediate/23_check_operators/README.md +31 -0
- package/dist/examples/intermediate/23_check_operators/api/sample.mmt +27 -0
- package/dist/examples/intermediate/23_check_operators/operators_test.mmt +54 -0
- package/dist/examples/intermediate/24_test_call_cache/README.md +34 -0
- package/dist/examples/intermediate/24_test_call_cache/api/login_echo.mmt +19 -0
- package/dist/examples/intermediate/24_test_call_cache/create_session.mmt +28 -0
- package/dist/examples/intermediate/24_test_call_cache/use_session_cache.mmt +41 -0
- package/dist/examples/intermediate/25_convert_to_mmt/README.md +17 -0
- package/dist/examples/intermediate/25_convert_to_mmt/bruno/README.md +5 -0
- package/dist/examples/intermediate/25_convert_to_mmt/bruno/converted/api/create-user.mmt +11 -0
- package/dist/examples/intermediate/25_convert_to_mmt/bruno/converted/tests/create-user.mmt +11 -0
- package/dist/examples/intermediate/25_convert_to_mmt/http/README.md +5 -0
- package/dist/examples/intermediate/25_convert_to_mmt/http/converted/api/ping.mmt +9 -0
- package/dist/examples/intermediate/25_convert_to_mmt/http/converted/tests/source-http.mmt +11 -0
- package/dist/examples/intermediate/25_convert_to_mmt/openapi/README.md +5 -0
- package/dist/examples/intermediate/25_convert_to_mmt/openapi/converted/api/get-sample-json.mmt +8 -0
- package/dist/examples/intermediate/25_convert_to_mmt/postman/README.md +7 -0
- package/dist/examples/intermediate/25_convert_to_mmt/postman/converted/api/ping.mmt +23 -0
- package/dist/examples/intermediate/25_convert_to_mmt/postman/converted/suites/collection.mmt +7 -0
- package/dist/examples/intermediate/25_convert_to_mmt/postman/converted/tests/collection.mmt +17 -0
- package/dist/examples/intermediate/25_convert_to_mmt/wsdl/README.md +5 -0
- package/dist/examples/intermediate/25_convert_to_mmt/wsdl/converted/api/ping.mmt +21 -0
- package/dist/examples/intermediate/26_yaml_expect_typing/README.md +21 -0
- package/dist/examples/intermediate/26_yaml_expect_typing/typing_test.mmt +29 -0
- package/dist/examples/intermediate/27_ai_judge/README.md +31 -0
- package/dist/examples/intermediate/27_ai_judge/judge_demo.mmt +33 -0
- package/dist/examples/intermediate/27_ai_judge/judges/gemini.mmt +12 -0
- package/dist/examples/intermediate/27_ai_judge/judges/ollama.mmt +8 -0
- package/dist/examples/professional/01_report_generation/README.md +87 -0
- package/dist/examples/professional/01_report_generation/api/echo.mmt +13 -0
- package/dist/examples/professional/01_report_generation/suite.mmt +12 -0
- package/dist/examples/professional/01_report_generation/test/fail_test.mmt +11 -0
- package/dist/examples/professional/01_report_generation/test/pass_test.mmt +17 -0
- package/dist/examples/professional/02_tls_certificates/README.md +113 -0
- package/dist/examples/professional/02_tls_certificates/api/secure_echo.mmt +13 -0
- package/dist/examples/professional/02_tls_certificates/env.mmt +17 -0
- package/dist/examples/professional/02_tls_certificates/tls_test.mmt +12 -0
- package/dist/examples/professional/03_load_test/README.md +39 -0
- package/dist/examples/professional/03_load_test/echo_api.mmt +12 -0
- package/dist/examples/professional/03_load_test/echo_test.mmt +14 -0
- package/dist/examples/professional/03_load_test/loadtest.mmt +15 -0
- package/dist/examples/professional/04_convert_to_mmt/README.md +30 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/README.md +8 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/basic-auth-check.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/bearer-auth-check.mmt +12 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/cache-headers.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/delayed-response.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/echo-anything-alias.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/echo-delete.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/echo-get-with-query.mmt +10 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/echo-post-body.mmt +13 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/echo-put-body.mmt +14 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/get-sample-html.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/get-sample-json.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/get-sample-xml.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/method-match-get.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/random-bytes.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/redirect-twice.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/return-client-ip.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/return-cookies.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/return-request-headers.mmt +10 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/return-status-200.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/return-status-404.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/service-help.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/api/set-cookie.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/basic-auth-check.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/bearer-auth-check.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/cache-headers.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/delayed-response.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/echo-anything-alias.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/echo-delete.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/echo-get-with-query.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/echo-post-body.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/echo-put-body.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/get-sample-html.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/get-sample-json.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/get-sample-xml.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/method-match-get.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/random-bytes.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/redirect-twice.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/return-client-ip.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/return-cookies.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/return-request-headers.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/return-status-200.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/return-status-404.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/service-help.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/bruno/converted/tests/set-cookie.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/http/README.md +7 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/basic-auth-check.mmt +10 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/bearer-auth-check.mmt +10 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/cache-headers.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/delayed-response.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/echo-anything-alias.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/echo-delete.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/echo-get-with-query.mmt +10 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/echo-post-body.mmt +13 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/echo-put-body.mmt +14 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/get-sample-html.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/get-sample-json.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/get-sample-xml.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/method-match-get.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/random-bytes.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/redirect-twice.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/return-client-ip.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/return-cookies.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/return-request-headers.mmt +10 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/return-status-200.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/return-status-404.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/service-help.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/api/set-cookie.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/http/converted/tests/source-http.mmt +95 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/README.md +8 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/basic-auth-check.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/bearer-auth-check.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/cache-headers.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/delayed-response.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/echo-anything-alias.mmt +13 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/echo-delete.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/echo-get-with-query.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/echo-post-body.mmt +36 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/echo-put-body.mmt +25 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/get-sample-html.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/get-sample-json.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/get-sample-xml.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/method-match.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/random-bytes.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/redirect-n-times.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/return-client-ip.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/return-cookies.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/return-request-headers.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/return-status-code.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/service-help.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/openapi/converted/api/set-cookie.mmt +9 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/README.md +8 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/auth/basic-auth-check.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/auth/bearer-auth-check.mmt +10 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/echo/echo-anything-alias.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/echo/echo-delete.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/echo/echo-get-with-query.mmt +8 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/echo/echo-post-body.mmt +13 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/echo/echo-put-body.mmt +14 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/inspect/return-client-ip.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/inspect/return-cookies.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/inspect/return-request-headers.mmt +8 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/inspect/set-cookie.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/samples/get-sample-html.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/samples/get-sample-json.mmt +28 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/samples/get-sample-xml.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/samples/random-bytes.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/samples/service-help.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/status/cache-headers.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/status/delayed-response.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/status/method-match-get.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/status/redirect-twice.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/status/return-status-200.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/api/status/return-status-404.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/multimeter.mmt +11 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/suites/auth.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/suites/collection.mmt +15 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/suites/echo.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/suites/inspect.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/suites/samples.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/suites/status.mmt +7 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/tests/auth.mmt +15 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/tests/echo.mmt +27 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/tests/inspect.mmt +23 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/tests/samples.mmt +29 -0
- package/dist/examples/professional/04_convert_to_mmt/postman/converted/tests/status.mmt +31 -0
- package/dist/examples/professional/04_convert_to_mmt/wsdl/README.md +8 -0
- package/dist/examples/professional/04_convert_to_mmt/wsdl/converted/api/echomessage.mmt +23 -0
- package/dist/examples/professional/04_convert_to_mmt/wsdl/converted/api/getsamplexml.mmt +21 -0
- package/dist/examples/professional/04_convert_to_mmt/wsdl/converted/api/probestatus.mmt +21 -0
- package/dist/examples/professional/05_tls_mock_server/README.md +19 -0
- package/dist/examples/professional/05_tls_mock_server/api/secure_health.mmt +11 -0
- package/dist/examples/professional/05_tls_mock_server/multimeter.mmt +3 -0
- package/dist/examples/professional/05_tls_mock_server/server/mock_server.mmt +23 -0
- package/dist/examples/professional/05_tls_mock_server/test/secure_health_test.mmt +15 -0
- package/dist/examples/professional/06_mtls_mock_server/README.md +23 -0
- package/dist/examples/professional/06_mtls_mock_server/api/secure_health.mmt +11 -0
- package/dist/examples/professional/06_mtls_mock_server/multimeter.mmt +12 -0
- package/dist/examples/professional/06_mtls_mock_server/server/mock_server.mmt +24 -0
- package/dist/examples/professional/06_mtls_mock_server/test/secure_health_test.mmt +15 -0
- package/dist/examples/professional/07_mock_server_timeout/README.md +26 -0
- package/dist/examples/professional/07_mock_server_timeout/api/slow_request.mmt +10 -0
- package/dist/examples/professional/07_mock_server_timeout/server/mock_server.mmt +19 -0
- package/dist/examples/professional/07_mock_server_timeout/suite.mmt +7 -0
- package/dist/examples/professional/07_mock_server_timeout/test/slow_timeout_test.mmt +15 -0
- package/dist/examples/professional/08_external_mtls_badssl/README.md +52 -0
- package/dist/examples/professional/08_external_mtls_badssl/api/badssl_client.mmt +6 -0
- package/dist/examples/professional/08_external_mtls_badssl/badssl_mtls_test.mmt +10 -0
- package/dist/examples/professional/08_external_mtls_badssl/multimeter.mmt +13 -0
- package/dist/examples/professional/09_ci_pipelines/README.md +92 -0
- package/dist/examples/professional/09_ci_pipelines/smoke_get.mmt +9 -0
- package/dist/examples/professional/09_ci_pipelines/smoke_post.mmt +12 -0
- package/dist/examples/professional/09_ci_pipelines/suite.mmt +9 -0
- package/dist/examples/professional/10_vault_http_setenv/README.md +60 -0
- package/dist/examples/professional/10_vault_http_setenv/api/bearer_with_env_token.mmt +16 -0
- package/dist/examples/professional/10_vault_http_setenv/api/vault_kv_read.mmt +22 -0
- package/dist/examples/professional/10_vault_http_setenv/env.mmt +21 -0
- package/dist/examples/professional/10_vault_http_setenv/server/vault_kv_mock.mmt +45 -0
- package/dist/examples/professional/10_vault_http_setenv/vault_to_api_test.mmt +22 -0
- package/dist/guides/agent-workflow.md +75 -0
- package/dist/guides/general.md +64 -0
- package/dist/guides/generate-api.md +221 -0
- package/dist/guides/generate-doc.md +103 -0
- package/dist/guides/generate-env.md +147 -0
- package/dist/guides/generate-loadtest.md +55 -0
- package/dist/guides/generate-suite.md +167 -0
- package/dist/guides/generate-test-skill.md +60 -0
- package/dist/guides/generate-test.md +335 -0
- package/dist/guides/generate.md +60 -0
- package/dist/guides/golden-smoke.md +52 -0
- package/dist/guides/min/api.md +29 -0
- package/dist/guides/min/constraints.md +9 -0
- package/dist/guides/min/doc.md +17 -0
- package/dist/guides/min/env.md +26 -0
- package/dist/guides/min/loadtest.md +17 -0
- package/dist/guides/min/overview.md +25 -0
- package/dist/guides/min/suite.md +18 -0
- package/dist/guides/min/test.md +42 -0
- package/dist/guides/min/workflow.md +16 -0
- package/dist/guides/offline-agent.md +46 -0
- package/dist/server.cjs +27500 -0
- package/dist/server.js +27500 -0
- package/package.json +58 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type: api
|
|
2
|
+
title: Get User by ID
|
|
3
|
+
description: GET request with a path parameter to fetch a user
|
|
4
|
+
inputs:
|
|
5
|
+
user_id: "42"
|
|
6
|
+
outputs:
|
|
7
|
+
id: body.id
|
|
8
|
+
name: body.name
|
|
9
|
+
email: body.email
|
|
10
|
+
url: http://localhost:9099/users/<<i:user_id>>
|
|
11
|
+
method: get
|
|
12
|
+
format: json
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
type: server
|
|
2
|
+
title: Sample Mock Server
|
|
3
|
+
description: A mock server with GET and POST endpoints
|
|
4
|
+
port: 9099
|
|
5
|
+
cors: true
|
|
6
|
+
endpoints:
|
|
7
|
+
- method: get
|
|
8
|
+
path: /health
|
|
9
|
+
status: 200
|
|
10
|
+
format: json
|
|
11
|
+
body:
|
|
12
|
+
status: ok
|
|
13
|
+
uptime: 12345
|
|
14
|
+
- method: get
|
|
15
|
+
path: /users/:id
|
|
16
|
+
status: 200
|
|
17
|
+
format: json
|
|
18
|
+
body:
|
|
19
|
+
id: "${url.id}"
|
|
20
|
+
name: Test User
|
|
21
|
+
email: testuser@example.com
|
|
22
|
+
- method: post
|
|
23
|
+
path: /users
|
|
24
|
+
status: 201
|
|
25
|
+
format: json
|
|
26
|
+
body:
|
|
27
|
+
id: r:uuid
|
|
28
|
+
name: "${body.name}"
|
|
29
|
+
email: "${body.email}"
|
|
30
|
+
message: User created
|
|
31
|
+
- method: get
|
|
32
|
+
path: /search
|
|
33
|
+
status: 200
|
|
34
|
+
format: json
|
|
35
|
+
body:
|
|
36
|
+
query: received
|
|
37
|
+
results:
|
|
38
|
+
- id: 1
|
|
39
|
+
title: First result
|
|
40
|
+
- id: 2
|
|
41
|
+
title: Second result
|
|
42
|
+
fallback:
|
|
43
|
+
status: 404
|
|
44
|
+
format: json
|
|
45
|
+
body:
|
|
46
|
+
error: Not Found
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type: suite
|
|
2
|
+
title: Mock Server Tests
|
|
3
|
+
description: Starts the mock server and runs all API tests against it
|
|
4
|
+
tags:
|
|
5
|
+
- example
|
|
6
|
+
- mock
|
|
7
|
+
servers:
|
|
8
|
+
- server/mock_server.mmt
|
|
9
|
+
items:
|
|
10
|
+
- test/health_test.mmt
|
|
11
|
+
- test/user_test.mmt
|
|
12
|
+
- test/search_test.mmt
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type: test
|
|
2
|
+
title: Health Check Test
|
|
3
|
+
description: Starts the mock server, calls the health endpoint, and verifies the response
|
|
4
|
+
import:
|
|
5
|
+
server: ../server/mock_server.mmt
|
|
6
|
+
health: ../api/get_health.mmt
|
|
7
|
+
steps:
|
|
8
|
+
- run: server
|
|
9
|
+
- call: health
|
|
10
|
+
id: result
|
|
11
|
+
expect:
|
|
12
|
+
status_field: ok
|
|
13
|
+
report: all
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type: test
|
|
2
|
+
title: Search API Test
|
|
3
|
+
description: Tests the GET search endpoint with a query parameter
|
|
4
|
+
import:
|
|
5
|
+
server: ../server/mock_server.mmt
|
|
6
|
+
search: ../api/search.mmt
|
|
7
|
+
steps:
|
|
8
|
+
- run: server
|
|
9
|
+
- call: search
|
|
10
|
+
id: result
|
|
11
|
+
inputs:
|
|
12
|
+
q: multimeter
|
|
13
|
+
expect:
|
|
14
|
+
query: received
|
|
15
|
+
report: all
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
type: test
|
|
2
|
+
title: User API Test
|
|
3
|
+
description: Tests GET user by ID and POST create user against the mock server
|
|
4
|
+
import:
|
|
5
|
+
server: ../server/mock_server.mmt
|
|
6
|
+
getUser: ../api/get_user.mmt
|
|
7
|
+
createUser: ../api/create_user.mmt
|
|
8
|
+
inputs:
|
|
9
|
+
user_id: "42"
|
|
10
|
+
steps:
|
|
11
|
+
- run: server
|
|
12
|
+
- call: getUser
|
|
13
|
+
id: fetchedUser
|
|
14
|
+
inputs:
|
|
15
|
+
user_id: i:user_id
|
|
16
|
+
expect:
|
|
17
|
+
id: <<i:user_id>>
|
|
18
|
+
name: Test User
|
|
19
|
+
report: all
|
|
20
|
+
- call: createUser
|
|
21
|
+
id: newUser
|
|
22
|
+
inputs:
|
|
23
|
+
name: Bob
|
|
24
|
+
email: bob@example.com
|
|
25
|
+
expect:
|
|
26
|
+
message: User created
|
|
27
|
+
report: all
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Environment POST Echo
|
|
2
|
+
|
|
3
|
+
An intermediate environment-variable example that sends a POST request using env values in the URL, headers, and body.
|
|
4
|
+
|
|
5
|
+
## Files
|
|
6
|
+
|
|
7
|
+
| File | Description |
|
|
8
|
+
|---|---|
|
|
9
|
+
| `multimeter.mmt` | Defines `base_url` and `custom_header` variables |
|
|
10
|
+
| `post_echo.mmt` | POST request using `<<e:base_url>>/echo`, `e:custom_header`, and env accessors |
|
|
11
|
+
|
|
12
|
+
## How to use
|
|
13
|
+
|
|
14
|
+
### In VS Code
|
|
15
|
+
|
|
16
|
+
1. Open the Environment panel and load `multimeter.mmt`.
|
|
17
|
+
2. Open `post_echo.mmt`.
|
|
18
|
+
3. Click **Run**.
|
|
19
|
+
|
|
20
|
+
### With the CLI
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
npx testlight run examples/intermediate/19_environment_post_echo/post_echo.mmt \
|
|
24
|
+
--env-file examples/intermediate/19_environment_post_echo/multimeter.mmt
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Key concepts
|
|
28
|
+
|
|
29
|
+
- **`e:var`** references an environment variable as the whole value.
|
|
30
|
+
- **`<<e:var>>`** embeds an environment variable inside a string.
|
|
31
|
+
- **Accessors** like `<<e:custom_header[0:5]>>` reuse part of an env value.
|
|
32
|
+
|
|
33
|
+
See [Environment docs](../../../docs/files/env/index.md) for full details.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type: api
|
|
2
|
+
title: Post echo
|
|
3
|
+
description: Send a JSON body to the echo endpoint using an environment-based URL and env accessors
|
|
4
|
+
url: <<e:base_url>>/echo
|
|
5
|
+
method: post
|
|
6
|
+
format: json
|
|
7
|
+
headers:
|
|
8
|
+
X-Custom: e:custom_header
|
|
9
|
+
X-Custom-Prefix: <<e:custom_header[0:5]>>
|
|
10
|
+
body:
|
|
11
|
+
name: Multimeter
|
|
12
|
+
message: Hello from <<e:base_url[0:8]>>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Document Parameters
|
|
2
|
+
|
|
3
|
+
An intermediate `type: doc` example that documents input parameters with options and ranges.
|
|
4
|
+
|
|
5
|
+
## Files
|
|
6
|
+
|
|
7
|
+
| File | Description |
|
|
8
|
+
|---|---|
|
|
9
|
+
| `document.mmt` | Renders the parameter documentation and enables Try buttons |
|
|
10
|
+
| `api/search_users.mmt` | API with parameter descriptions, option lists, and a numeric range |
|
|
11
|
+
|
|
12
|
+
## How to use
|
|
13
|
+
|
|
14
|
+
1. Open `document.mmt` in VS Code with the Multimeter extension.
|
|
15
|
+
2. Expand `Search users`.
|
|
16
|
+
3. Review the documented parameters and their options/ranges.
|
|
17
|
+
|
|
18
|
+
## Key concepts
|
|
19
|
+
|
|
20
|
+
- **Options** use syntax like `<<i:role>> [admin, editor, viewer] Role description`.
|
|
21
|
+
- **Ranges** use syntax like `<<i:page>> [1-5] Page number`.
|
|
22
|
+
- **Output annotations** use `<<o:name>> Description`.
|
|
23
|
+
- **`html.triable: true`** enables interactive Try buttons in rendered docs.
|
|
24
|
+
|
|
25
|
+
See [Doc docs](../../../docs/files/doc/index.md#parameter-annotations-in-api-descriptions) for details.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
type: api
|
|
2
|
+
title: Search users
|
|
3
|
+
description: |-
|
|
4
|
+
Search users with documented parameter options and ranges.
|
|
5
|
+
|
|
6
|
+
<<i:role>> [admin, editor, viewer] Filter users by role
|
|
7
|
+
<<i:page>> [1-5] Page number to fetch
|
|
8
|
+
<<i:sort>> [name, created_at, updated_at] Field used for sorting
|
|
9
|
+
<<i:include_inactive>> [true, false] Include inactive users in the result
|
|
10
|
+
|
|
11
|
+
<<o:count>> Number of users returned
|
|
12
|
+
<<o:request_method>> HTTP method used by the request
|
|
13
|
+
inputs:
|
|
14
|
+
role: viewer
|
|
15
|
+
page: 1
|
|
16
|
+
sort: name
|
|
17
|
+
include_inactive: false
|
|
18
|
+
outputs:
|
|
19
|
+
count: body.count
|
|
20
|
+
request_method: body.method
|
|
21
|
+
url: https://test.mmt.dev/echo
|
|
22
|
+
method: post
|
|
23
|
+
format: json
|
|
24
|
+
body:
|
|
25
|
+
role: i:role
|
|
26
|
+
page: i:page
|
|
27
|
+
sort: i:sort
|
|
28
|
+
include_inactive: i:include_inactive
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Manual Timeout
|
|
2
|
+
|
|
3
|
+
This example shows how to override the default request timeout for one API request.
|
|
4
|
+
|
|
5
|
+
## Files
|
|
6
|
+
|
|
7
|
+
| File | Description |
|
|
8
|
+
|---|---|
|
|
9
|
+
| `manual_timeout.mmt` | Calls the public test endpoint with `timeout: 5000` and extracts status and duration outputs |
|
|
10
|
+
|
|
11
|
+
## How To Use
|
|
12
|
+
|
|
13
|
+
Open `manual_timeout.mmt` and run it from VS Code, or use the CLI:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
npx testlight run examples/intermediate/21_manual_timeout/manual_timeout.mmt
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Key Concept
|
|
20
|
+
|
|
21
|
+
- `timeout` is a per-request override in milliseconds.
|
|
22
|
+
- If omitted, Multimeter uses `setting.http.timeout` from the env file, or the built-in default of `30000` milliseconds.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type: api
|
|
2
|
+
title: Manual request timeout
|
|
3
|
+
description: Override the default network timeout for this single API request.
|
|
4
|
+
outputs:
|
|
5
|
+
status_code: status
|
|
6
|
+
response_time_ms: duration
|
|
7
|
+
message: body[message]
|
|
8
|
+
url: https://test.mmt.dev/json
|
|
9
|
+
method: get
|
|
10
|
+
timeout: 5000
|
|
11
|
+
format: json
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Omit Keyword
|
|
2
|
+
|
|
3
|
+
Intermediate example for the `omit` keyword in API inputs and outputs.
|
|
4
|
+
|
|
5
|
+
## Files
|
|
6
|
+
|
|
7
|
+
| File | Description |
|
|
8
|
+
|---|---|
|
|
9
|
+
| `omit_keyword.mmt` | Remove fields with `omit`, send real `null`, use quoted literals, and inspect echoed outputs |
|
|
10
|
+
| `omit_keyword_test.mmt` | Test that verifies omit/null/literal-string behavior via the echo API |
|
|
11
|
+
|
|
12
|
+
## How to use
|
|
13
|
+
|
|
14
|
+
### In VS Code
|
|
15
|
+
|
|
16
|
+
1. Open `omit_keyword.mmt`.
|
|
17
|
+
2. Click **Run** and inspect the request body and output values.
|
|
18
|
+
3. Change values in the **Inputs** panel:
|
|
19
|
+
- set `middle_name` to `omit` to remove it (output shows `omit`)
|
|
20
|
+
- set `middle_name` to `Lee` to send a normal string
|
|
21
|
+
- use `"omit"` when you want the literal string
|
|
22
|
+
|
|
23
|
+
### With the CLI
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
npx testlight run examples/intermediate/22_omit_keyword/omit_keyword.mmt
|
|
27
|
+
npx testlight run examples/intermediate/22_omit_keyword/omit_keyword_test.mmt
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Override inputs from the command line:
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
npx testlight run examples/intermediate/22_omit_keyword/omit_keyword.mmt \
|
|
34
|
+
-e middle_name=Lee -e nickname='"omit"'
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Key concepts
|
|
38
|
+
|
|
39
|
+
- **`omit` in inputs** — unquoted `omit` removes the target field from request objects (body/headers/query/cookies).
|
|
40
|
+
- **`null` in inputs** — unquoted `null` sends a real null value.
|
|
41
|
+
- **Quoted literals** — `"omit"` and `"null"` stay strings (like quoted numbers).
|
|
42
|
+
- **`omit` in outputs** — shown when an extraction path is missing (for example `echoed_middle_name` when `middle_name` was omitted).
|
|
43
|
+
- **`null` in outputs** — shown when the echoed field exists and its value is literally `null`.
|
|
44
|
+
|
|
45
|
+
See [API docs — inputs](../../../docs/files/api/index.md#inputs) and [API docs — outputs](../../../docs/files/api/index.md#outputs).
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
type: api
|
|
2
|
+
title: Omit keyword
|
|
3
|
+
description: |-
|
|
4
|
+
Use the `omit` keyword in inputs and see how it appears in outputs.
|
|
5
|
+
|
|
6
|
+
Inputs:
|
|
7
|
+
- `omit` (unquoted) removes the field from the request body
|
|
8
|
+
- `null` (unquoted) sends JSON null
|
|
9
|
+
- `"omit"` and `"null"` are literal strings
|
|
10
|
+
|
|
11
|
+
Outputs:
|
|
12
|
+
- missing path (for example `echoed_middle_name`) => omit
|
|
13
|
+
- existing null value (for example `echoed_bio`) => null
|
|
14
|
+
inputs:
|
|
15
|
+
display_name: Alex
|
|
16
|
+
middle_name: omit
|
|
17
|
+
nickname: "omit"
|
|
18
|
+
bio: null
|
|
19
|
+
bio_text: "null"
|
|
20
|
+
outputs:
|
|
21
|
+
echoed_display_name: body.body.displayName
|
|
22
|
+
echoed_middle_name: body.body.middleName
|
|
23
|
+
echoed_nickname: body.body.nickname
|
|
24
|
+
echoed_bio: body.body.bio
|
|
25
|
+
echoed_bio_text: body.body.bioText
|
|
26
|
+
url: https://test.mmt.dev/echo
|
|
27
|
+
method: post
|
|
28
|
+
format: json
|
|
29
|
+
body:
|
|
30
|
+
displayName: i:display_name
|
|
31
|
+
middleName: i:middle_name
|
|
32
|
+
nickname: i:nickname
|
|
33
|
+
bio: i:bio
|
|
34
|
+
bioText: i:bio_text
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
type: test
|
|
2
|
+
title: Omit keyword
|
|
3
|
+
import:
|
|
4
|
+
profile: ./omit_keyword.mmt
|
|
5
|
+
steps:
|
|
6
|
+
- call: profile
|
|
7
|
+
id: update
|
|
8
|
+
inputs:
|
|
9
|
+
display_name: Alex
|
|
10
|
+
middle_name: omit
|
|
11
|
+
nickname: "omit"
|
|
12
|
+
bio: null
|
|
13
|
+
bio_text: "null"
|
|
14
|
+
expect:
|
|
15
|
+
echoed_display_name: Alex
|
|
16
|
+
echoed_middle_name: omit
|
|
17
|
+
echoed_nickname: "omit"
|
|
18
|
+
echoed_bio: null
|
|
19
|
+
echoed_bio_text: "null"
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Check Operators
|
|
2
|
+
|
|
3
|
+
Intermediate example that exercises every comparison operator against a live echo response, using `expect` on the call plus `check` and `assert` steps.
|
|
4
|
+
|
|
5
|
+
## Files
|
|
6
|
+
|
|
7
|
+
| File | Description |
|
|
8
|
+
|---|---|
|
|
9
|
+
| `api/sample.mmt` | POST echo API with a fixed JSON body and named outputs |
|
|
10
|
+
| `operators_test.mmt` | Test covering numeric, string, membership, regex, length, and fuzzy operators |
|
|
11
|
+
|
|
12
|
+
## How to use
|
|
13
|
+
|
|
14
|
+
### In VS Code
|
|
15
|
+
|
|
16
|
+
1. Open `operators_test.mmt`.
|
|
17
|
+
2. Click **Run test** and inspect expect / check / assert results in the report panel.
|
|
18
|
+
|
|
19
|
+
### With the CLI
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
npx testlight run examples/intermediate/23_check_operators/operators_test.mmt
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Key concepts
|
|
26
|
+
|
|
27
|
+
- **`expect` on `call`** — validate outputs inline (grouped as one report item).
|
|
28
|
+
- **`check`** — log failures and continue.
|
|
29
|
+
- **`assert`** — stop the flow on failure.
|
|
30
|
+
- **Fuzzy operators** — `>N%` (at least N% similar) and `<N%` (less than N% similar); UI forms are `>%` / `<%` with a percent selector.
|
|
31
|
+
- **YAML quoting** — operators that start with `>` (including `>80%` and `>%`) must be quoted in YAML.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
type: api
|
|
2
|
+
title: Operator sample payload
|
|
3
|
+
description: Echoes a fixed JSON payload so comparison operators can be exercised against a live response
|
|
4
|
+
outputs:
|
|
5
|
+
status_code: status
|
|
6
|
+
method: body.method
|
|
7
|
+
name: body.body.name
|
|
8
|
+
nickname: body.body.nickname
|
|
9
|
+
role: body.body.role
|
|
10
|
+
score: body.body.score
|
|
11
|
+
tags: body.body.tags
|
|
12
|
+
message: body.body.message
|
|
13
|
+
path: body.body.path
|
|
14
|
+
url: https://test.mmt.dev/echo
|
|
15
|
+
method: post
|
|
16
|
+
format: json
|
|
17
|
+
body:
|
|
18
|
+
name: Jonathan
|
|
19
|
+
nickname: Jon
|
|
20
|
+
role: admin
|
|
21
|
+
score: 85
|
|
22
|
+
tags:
|
|
23
|
+
- api
|
|
24
|
+
- test
|
|
25
|
+
- demo
|
|
26
|
+
message: Hello world from Multimeter
|
|
27
|
+
path: /api/v1/users
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
type: test
|
|
2
|
+
title: Check operators
|
|
3
|
+
description: |-
|
|
4
|
+
Exercises every comparison operator against a live server response using
|
|
5
|
+
expect on the call, plus check and assert steps.
|
|
6
|
+
import:
|
|
7
|
+
sample: ./api/sample.mmt
|
|
8
|
+
steps:
|
|
9
|
+
- call: sample
|
|
10
|
+
id: res
|
|
11
|
+
expect:
|
|
12
|
+
status_code: == 200
|
|
13
|
+
method: == POST
|
|
14
|
+
name: =C athan
|
|
15
|
+
nickname: =^ Jo
|
|
16
|
+
role: =$ min
|
|
17
|
+
score:
|
|
18
|
+
- ">= 80"
|
|
19
|
+
- <= 90
|
|
20
|
+
path: =* /users/
|
|
21
|
+
message: >60% Hello world from MMT
|
|
22
|
+
tags: =# 3
|
|
23
|
+
- assert: ${res.status_code} == 200
|
|
24
|
+
- assert: ${res.score} != 0
|
|
25
|
+
- assert: ${res.role} !@ guest,user
|
|
26
|
+
- check: ${res.score} > 50
|
|
27
|
+
- check: ${res.score} < 100
|
|
28
|
+
- check: ${res.name} !C xyz
|
|
29
|
+
- check: ${res.nickname} !^ Ad
|
|
30
|
+
- check: ${res.path} !$ /admin
|
|
31
|
+
- check: ${res.message} !* /error/i
|
|
32
|
+
- check: ${res.tags} !# 0
|
|
33
|
+
- check: ${res.role} =@ admin
|
|
34
|
+
- check: ${res.name} <40% completely-different
|
|
35
|
+
- check:
|
|
36
|
+
title: Fuzzy match with default percent
|
|
37
|
+
actual: ${res.message}
|
|
38
|
+
operator: >60%
|
|
39
|
+
expected: Hello world from MMT
|
|
40
|
+
- check:
|
|
41
|
+
title: Fuzzy match with default percent
|
|
42
|
+
actual: ${res.message}
|
|
43
|
+
operator: <50%
|
|
44
|
+
expected: Hi Universe
|
|
45
|
+
- check:
|
|
46
|
+
title: Path starts with /api/
|
|
47
|
+
actual: ${res.path}
|
|
48
|
+
operator: =^
|
|
49
|
+
expected: /api/
|
|
50
|
+
- assert:
|
|
51
|
+
title: Fuzzy match with default percent
|
|
52
|
+
actual: ${res.message}
|
|
53
|
+
operator: ==
|
|
54
|
+
expected: Hello world from Multimeter
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Test Call Cache
|
|
2
|
+
|
|
3
|
+
Advanced example: a session-style test declares `cache: 5m` so repeated `call:`s with the same title + inputs reuse outputs within one top-level run — a single test, suite, or nested suite hierarchy (second call skips nested HTTP).
|
|
4
|
+
|
|
5
|
+
Design: `AI/sdd/sdd-test-call-cache.md`. User docs: [Test `.mmt` — cache](../../../docs/files/test/cache.md).
|
|
6
|
+
|
|
7
|
+
## Files
|
|
8
|
+
|
|
9
|
+
| File | Description |
|
|
10
|
+
|------|-------------|
|
|
11
|
+
| `api/login_echo.mmt` | Stand-in “login” API (echo) that returns a token-like field |
|
|
12
|
+
| `create_session.mmt` | Cached test (`cache: 5m`) that calls the API and exports `token` |
|
|
13
|
+
| `use_session_cache.mmt` | Parent: two identical session calls (cache hit) + one different user (miss) |
|
|
14
|
+
|
|
15
|
+
## How to use
|
|
16
|
+
|
|
17
|
+
### In VS Code
|
|
18
|
+
|
|
19
|
+
1. Open `use_session_cache.mmt` and **Run**.
|
|
20
|
+
2. First `call: session` performs HTTP; the second identical call should be served from cache (database icon next to pass/fail once the feature is wired in the UI).
|
|
21
|
+
3. The third call uses different inputs → cache miss → HTTP again.
|
|
22
|
+
|
|
23
|
+
### With the CLI
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
npx testlight run examples/intermediate/24_test_call_cache/use_session_cache.mmt
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Key concepts
|
|
30
|
+
|
|
31
|
+
- **`cache` on the callee test** — scalar duration / epoch / date-time; not on `type: api` in phase 1.
|
|
32
|
+
- **Key = title + inputs** — same session title and same inputs → same outputs.
|
|
33
|
+
- **Bypass body only** — nested server/HTTP in the callee is skipped on hit; caller expects still run.
|
|
34
|
+
- **Same top-level run** — shared across suite hierarchy until TTL expires or the run finishes; no disk.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
type: api
|
|
2
|
+
title: Login echo
|
|
3
|
+
description: |-
|
|
4
|
+
Stand-in login endpoint for the call-cache example.
|
|
5
|
+
Echoes username back as a fake token payload.
|
|
6
|
+
inputs:
|
|
7
|
+
username: alice
|
|
8
|
+
password: secret
|
|
9
|
+
outputs:
|
|
10
|
+
token: body.body.token
|
|
11
|
+
user: body.body.user
|
|
12
|
+
status_code: status
|
|
13
|
+
url: https://test.mmt.dev/echo
|
|
14
|
+
method: post
|
|
15
|
+
format: json
|
|
16
|
+
body:
|
|
17
|
+
user: i:username
|
|
18
|
+
token: <<i:username>>-session-token
|
|
19
|
+
password: i:password
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
type: test
|
|
2
|
+
title: Create session
|
|
3
|
+
description: |-
|
|
4
|
+
Expensive setup test: calls login once per distinct inputs.
|
|
5
|
+
`cache: 5m` means further calls in the same root run with the same
|
|
6
|
+
title + inputs reuse outputs and skip nested HTTP.
|
|
7
|
+
import:
|
|
8
|
+
login: ./api/login_echo.mmt
|
|
9
|
+
inputs:
|
|
10
|
+
user: alice
|
|
11
|
+
pass: secret
|
|
12
|
+
outputs:
|
|
13
|
+
token: ''
|
|
14
|
+
user: ''
|
|
15
|
+
cache: 5m
|
|
16
|
+
steps:
|
|
17
|
+
- call: login
|
|
18
|
+
id: auth
|
|
19
|
+
title: Login (network)
|
|
20
|
+
inputs:
|
|
21
|
+
username: i:user
|
|
22
|
+
password: i:pass
|
|
23
|
+
expect:
|
|
24
|
+
status: =~ "200"
|
|
25
|
+
token: != null
|
|
26
|
+
- js: |
|
|
27
|
+
outputs.token = auth.token
|
|
28
|
+
outputs.user = auth.user
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
type: test
|
|
2
|
+
title: Use cached session
|
|
3
|
+
description: |-
|
|
4
|
+
Advanced cache example:
|
|
5
|
+
1) First call runs Create session (HTTP).
|
|
6
|
+
2) Second call — same inputs — returns cached outputs (DB icon in reports).
|
|
7
|
+
3) Third call — different user — cache miss, HTTP again.
|
|
8
|
+
import:
|
|
9
|
+
session: ./create_session.mmt
|
|
10
|
+
steps:
|
|
11
|
+
- call: session
|
|
12
|
+
id: first
|
|
13
|
+
title: Session for alice (miss → HTTP)
|
|
14
|
+
inputs:
|
|
15
|
+
user: alice
|
|
16
|
+
pass: secret
|
|
17
|
+
expect:
|
|
18
|
+
token: != null
|
|
19
|
+
user: == alice
|
|
20
|
+
|
|
21
|
+
- call: session
|
|
22
|
+
id: second
|
|
23
|
+
title: Session for alice again (hit → cache)
|
|
24
|
+
inputs:
|
|
25
|
+
user: alice
|
|
26
|
+
pass: secret
|
|
27
|
+
expect:
|
|
28
|
+
token: == ${first.token}
|
|
29
|
+
user: == alice
|
|
30
|
+
|
|
31
|
+
- call: session
|
|
32
|
+
id: third
|
|
33
|
+
title: Session for bob (miss → HTTP)
|
|
34
|
+
inputs:
|
|
35
|
+
user: bob
|
|
36
|
+
pass: other
|
|
37
|
+
expect:
|
|
38
|
+
token:
|
|
39
|
+
- != null
|
|
40
|
+
- != ${first.token}
|
|
41
|
+
user: == bob
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Convert to MMT
|
|
2
|
+
|
|
3
|
+
Minimal source files that show the **Convert to MMT...** workflow. Right-click a source file, convert it, and compare the result with the matching `converted/` folder.
|
|
4
|
+
|
|
5
|
+
Each format is one request or one operation so the mapping stays easy to read.
|
|
6
|
+
|
|
7
|
+
| Folder | Source | What you get |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| `openapi/` | `source.openapi.yaml` | One `type: api` file |
|
|
10
|
+
| `postman/` | `source.postman_collection.json` | API, test, and suite files |
|
|
11
|
+
| `wsdl/` | `source.wsdl` | One SOAP `type: api` file |
|
|
12
|
+
| `http/` | `source.http` | API plus a test that calls it |
|
|
13
|
+
| `bruno/` | `source.bru` | API plus a test that calls it |
|
|
14
|
+
|
|
15
|
+
All live HTTP examples target [test.mmt.dev](https://test.mmt.dev).
|
|
16
|
+
|
|
17
|
+
For the full sandbox endpoint set across every format (OpenAPI, HTTP, Bruno, Postman, WSDL), see [professional convert](../../professional/04_convert_to_mmt/).
|