|
| 1 | +@endpoint(sourcemap-intake) @endpoint(sourcemap-intake-v2) |
| 2 | +Feature: Source Map Intake |
| 3 | + Upload source maps, symbol files, and mapping files to Datadog for error |
| 4 | + deobfuscation. This endpoint enables you to upload various types of debug |
| 5 | + symbols for RUM Error Tracking, allowing Datadog to display readable stack |
| 6 | + traces instead of minified or obfuscated code. |
| 7 | + |
| 8 | + Background: |
| 9 | + Given a valid "apiKeyAuth" key in the system |
| 10 | + And an instance of "RUM" API |
| 11 | + |
| 12 | + @generated @skip @team:DataDog/rum-backend |
| 13 | + Scenario: Upload source maps returns "Bad Request" response |
| 14 | + Given new "UploadSourceMap" request |
| 15 | + And body with value {"type": "js_sourcemap"} |
| 16 | + When the request is sent |
| 17 | + Then the response status is 400 Bad Request |
| 18 | + |
| 19 | + @generated @skip @team:DataDog/rum-backend |
| 20 | + Scenario: Upload source maps returns "Unauthorized" response |
| 21 | + Given new "UploadSourceMap" request |
| 22 | + And body with value {"type": "js_sourcemap", "service": "my-web-app", "version": "1.2.3", "minified_url": "https://example.com/static/js/main.min.js"} |
| 23 | + When the request is sent |
| 24 | + Then the response status is 401 Unauthorized |
| 25 | + |
| 26 | + @integration-only @skip @team:DataDog/rum-backend |
| 27 | + Scenario: Upload JavaScript source map returns "OK" response |
| 28 | + Given new "UploadSourceMap" request |
| 29 | + And request contains "type" parameter with value "js_sourcemap" |
| 30 | + And request contains "service" parameter with value "test-service-{{ unique_hash }}" |
| 31 | + And request contains "version" parameter with value "1.0.0" |
| 32 | + And request contains "minified_url" parameter with value "https://example.com/static/js/main.min.js" |
| 33 | + And request contains "source_map" parameter with file "fixtures/sourcemap_intake/javascript/main.min.js.map" |
| 34 | + And request contains "minified_file" parameter with file "fixtures/sourcemap_intake/javascript/main.min.js" |
| 35 | + When the request is sent |
| 36 | + Then the response status is 200 OK |
| 37 | + And the response "data.type" is equal to "sourcemap_upload" |
| 38 | + |
| 39 | + @integration-only @skip @team:DataDog/rum-backend |
| 40 | + Scenario: Upload React Native source map returns "OK" response |
| 41 | + Given new "UploadSourceMap" request |
| 42 | + And request contains "type" parameter with value "react_native_sourcemap" |
| 43 | + And request contains "service" parameter with value "test-mobile-{{ unique_hash }}" |
| 44 | + And request contains "version" parameter with value "2.0.0" |
| 45 | + And request contains "platform" parameter with value "ios" |
| 46 | + And request contains "bundle_name" parameter with value "main.jsbundle" |
| 47 | + And request contains "source_map" parameter with file "fixtures/sourcemap_intake/react_native/main.jsbundle.map" |
| 48 | + When the request is sent |
| 49 | + Then the response status is 200 OK |
| 50 | + And the response "data.type" is equal to "sourcemap_upload" |
| 51 | + |
| 52 | + @integration-only @skip @team:DataDog/rum-backend |
| 53 | + Scenario: Upload JVM mapping file returns "OK" response |
| 54 | + Given new "UploadSourceMap" request |
| 55 | + And request contains "type" parameter with value "jvm_mapping_file" |
| 56 | + And request contains "service" parameter with value "test-android-{{ unique_hash }}" |
| 57 | + And request contains "version" parameter with value "3.0.0" |
| 58 | + And request contains "jvm_mapping_file" parameter with file "fixtures/sourcemap_intake/android/mapping.txt" |
| 59 | + When the request is sent |
| 60 | + Then the response status is 200 OK |
| 61 | + And the response "data.type" is equal to "sourcemap_upload" |
| 62 | + |
| 63 | + @integration-only @skip @team:DataDog/rum-backend |
| 64 | + Scenario: Upload iOS symbols returns "OK" response |
| 65 | + Given new "UploadSourceMap" request |
| 66 | + And request contains "type" parameter with value "ios_symbols" |
| 67 | + And request contains "uuids" parameter with value "A1B2C3D4-E5F6-7890-ABCD-EF1234567890" |
| 68 | + And request contains "symbols_archive" parameter with file "fixtures/sourcemap_intake/ios/symbols.zip" |
| 69 | + When the request is sent |
| 70 | + Then the response status is 200 OK |
| 71 | + And the response "data.type" is equal to "sourcemap_upload" |
| 72 | + |
| 73 | + @integration-only @skip @team:DataDog/rum-backend |
| 74 | + Scenario: Upload Flutter symbol file returns "OK" response |
| 75 | + Given new "UploadSourceMap" request |
| 76 | + And request contains "type" parameter with value "flutter_symbol_file" |
| 77 | + And request contains "service" parameter with value "test-flutter-{{ unique_hash }}" |
| 78 | + And request contains "version" parameter with value "1.0.0" |
| 79 | + And request contains "variant" parameter with value "release" |
| 80 | + And request contains "platform" parameter with value "android" |
| 81 | + And request contains "arch" parameter with value "arm64" |
| 82 | + And request contains "flutter_symbol_file" parameter with file "fixtures/sourcemap_intake/flutter/app.symbols" |
| 83 | + When the request is sent |
| 84 | + Then the response status is 200 OK |
| 85 | + And the response "data.type" is equal to "sourcemap_upload" |
| 86 | + |
| 87 | + @integration-only @skip @team:DataDog/rum-backend |
| 88 | + Scenario: Upload NDK symbol file returns "OK" response |
| 89 | + Given new "UploadSourceMap" request |
| 90 | + And request contains "type" parameter with value "ndk_symbol_file" |
| 91 | + And request contains "build_id" parameter with value "abc123def456" |
| 92 | + And request contains "arch" parameter with value "arm64-v8a" |
| 93 | + And request contains "ndk_symbol_file" parameter with file "fixtures/sourcemap_intake/android/libnative.so" |
| 94 | + When the request is sent |
| 95 | + Then the response status is 200 OK |
| 96 | + And the response "data.type" is equal to "sourcemap_upload" |
| 97 | + |
| 98 | + @generated @skip @team:DataDog/rum-backend |
| 99 | + Scenario: Upload source maps returns "Payload Too Large" response |
| 100 | + Given new "UploadSourceMap" request |
| 101 | + And body with value {"type": "js_sourcemap", "service": "my-web-app", "version": "1.2.3", "minified_url": "https://example.com/static/js/main.min.js"} |
| 102 | + When the request is sent |
| 103 | + Then the response status is 413 Payload Too Large |
| 104 | + |
| 105 | + @generated @skip @team:DataDog/rum-backend |
| 106 | + Scenario: Upload source maps returns "Too Many Requests" response |
| 107 | + Given new "UploadSourceMap" request |
| 108 | + And body with value {"type": "js_sourcemap", "service": "my-web-app", "version": "1.2.3", "minified_url": "https://example.com/static/js/main.min.js"} |
| 109 | + When the request is sent |
| 110 | + Then the response status is 429 Too Many Requests |
0 commit comments