# Copyright The OpenTelemetry Authors # SPDX-License-Identifier: Apache-2.0 type: Test spec: id: frontend-browse-product name: 'Frontend: Browse products' description: Simulate the user browsing products on Astronomy Shop trigger: type: http httpRequest: url: http://${env:FRONTEND_ADDR}/api/products/0PUK6V6EV0 method: GET headers: - key: Content-Type value: application/json specs: - name: It called the frontend with success and got a product with valid attributes selector: span[tracetest.span.type="general" name="Tracetest trigger"] assertions: - attr:tracetest.response.status = 200 - attr:tracetest.response.body | json_path '$.id' = "0PUK6V6EV0" - attr:tracetest.response.body | json_path '$.description' != "" - attr:tracetest.response.body | json_path '$.picture' != "" - attr:tracetest.response.body | json_path '$.priceUsd' != "{}" - attr:tracetest.response.body | json_path '$.categories' != "[]" - name: It queried the product catalog correctly for a specific product selector: span[tracetest.span.type="rpc" name="oteldemo.ProductCatalogService/GetProduct" rpc.system="grpc" rpc.method="GetProduct" rpc.service="oteldemo.ProductCatalogService"] assertions: - attr:rpc.grpc.status_code = 0 - attr:app.product.id = "0PUK6V6EV0"