API介面的測試步驟和返回資料展示

chatGPT發表於2023-04-20

測試步驟

介面測試是軟體測試中的一個重要環節,主要是為了驗證軟體的介面是否符合需求規範,是否能夠正常地被呼叫。介面測試一般分為以下幾個步驟:

    分析測試需求:介面測試之前,需要分析出測試需求,並拿到開發提供的介面說明文件。介面測試案例需要包括詳細的入參和出引數據以及明確的格式和檢查點。
    準備測試環境:準備好介面測試所需要的環境,包括模擬客戶端傳送請求的工具和介面測試資料。
    編寫介面測試案例:根據介面測試需求,編寫介面測試案例,其中要包括詳細的入參和出引數據以及明確的格式和檢查點。
    評審介面測試案例:和開發一起對介面測試案例進行評審,確保測試案例的準確性和完整性。
    準備測試資料:根據介面測試案例的需求,準備測試資料,並整理成csv格式的檔案。
    執行介面測試:使用模擬客戶端傳送請求的工具,執行介面測試,並及時記錄測試結果。
    分析測試結果:根據測試結果,分析出介面是否符合需求規範,並對發現的問題進行修復。
    提交測試報告:將介面測試的結果整理成測試報告,並提交給開發和其他相關人員。

總之,介面測試需要嚴格按照測試流程進行,並且需要根據實際情況進行適當的調整和修改。


返回資料展示

{
    "item": {
        "num_iid": "652874751412",
        "title": "北歐輕奢布藝沙發 小戶型簡約現代客廳ins風網紅款三雙人訂製沙發",
        "desc_short": "",
        "price": 480,
        "total_price": "",
        "suggestive_price": "",
        "orginal_price": 480,
        "nick": "惜情yqq1127",
        "num": 200,
        "detail_url": "
        "pic_url": "!!2568161054.jpg",
        "brand": null,
        "brandId": "",
        "rootCatId": "",
        "cid": 50020632,
        "desc": "<div > \n   <div >\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n    <img src=\"!!2568161054.jpg\"  />\n   </div> \n  </div><img src=\"https://www.o0b.cn/i.php?t.png&rid=gw-1.6440a58613a0e&p=1778787388&k=i_key&t=1681958279\" style=\"display:none\" />",
        "item_imgs": [
            {
                "url": "!!2568161054.jpg"
            },
            {
                "url": "!!2568161054.jpg"
            },
            {
                "url": "!!2568161054.jpg"
            },
            {
                "url": "!!2568161054.jpg"
            },
            {
                "url": "!!2568161054.jpg"
            }
        ],
        "item_weight": "",
        "post_fee": "",
        "freight": "",
        "express_fee": "",
        "ems_fee": "",
        "shipping_to": "",
        "video": {
            "url": null
        },
        "sample_id": "",
        "props_name": "31480:14306495906:幾人坐:腳踏90*60*48cm;31480:14306495907:幾人坐:雙人165*95*67cm;31480:14306495908:幾人坐:三人210*95*67cm;31480:14306495909:幾人坐:單人100*95*67cm;31480:21480914361:幾人坐:四人位240*95*67cm;31480:21480914362:幾人坐:大四人320*95*76cm;31480:1387571900:幾人坐:3米貴妃沙發;31480:32527954:幾人坐:定製尺寸;1627207:28321:顏色分類:乳白色 尺寸顏色可定製;1627207:28321:顏色分類:乳白色 尺寸顏色可定製;1627207:28321:顏色分類:乳白色 尺寸顏色可定製;1627207:28321:顏色分類:乳白色 尺寸顏色可定製;1627207:28321:顏色分類:乳白色 尺寸顏色可定製;1627207:28321:顏色分類:乳白色 尺寸顏色可定製;1627207:28321:顏色分類:乳白色 尺寸顏色可定製;1627207:28321:顏色分類:乳白色 尺寸顏色可定製",
        "prop_imgs": {
            "prop_img": [
                {
                    "properties": "1627207:28321",
                    "url": "!!2568161054.jpg"
                }
            ]
        },
        "props_imgs": {
            "prop_img": [
                {
                    "properties": "1627207:28321",
                    "url": "!!2568161054.jpg"
                }
            ]
        },
        "property_alias": "",
        "props": [
            {
                "name": "品牌",
                "value": "#0 工廠"
            },
            {
                "name": "型號",
                "value": "520"
            },
            {
                "name": "材質",
                "value": "木"
            },
            {
                "name": "木質材質",
                "value": "松木"
            },
            {
                "name": "面料",
                "value": "絨布"
            },
            {
                "name": "風格",
                "value": "北歐"
            },
            {
                "name": "幾人坐",
                "value": "腳踏90*60*48cm 雙人165*95*67cm 三人210*95*67cm 單人100*95*67cm 四人位240*95*67cm 大四人320*95*76cm 3米貴妃沙發 定製尺寸"
            },
            {
                "name": "顏色分類",
                "value": "乳白色"
            },
            {
                "name": "填充物",
                "value": "海綿"
            },
            {
                "name": "結構工藝",
                "value": "木質工藝"
            },
            {
                "name": "是否可定製",
                "value": "是"
            },
            {
                "name": "沙發組合形式",
                "value": "U形"
            },
            {
                "name": "是否可拆洗",
                "value": "是"
            },
            {
                "name": "適用物件",
                "value": "成年人"
            },
            {
                "name": "是否帶儲物空間",
                "value": "否"
            },
            {
                "name": "產地",
                "value": "上海"
            },
            {
                "name": "地市",
                "value": "上海市"
            },
            {
                "name": "區縣",
                "value": "奉賢區"
            },
            {
                "name": "是否組裝",
                "value": "否"
            },
            {
                "name": "計程車是否可運輸",
                "value": "否"
            },
            {
                "name": "填充物硬度",
                "value": "軟"
            },
            {
                "name": "款式定位",
                "value": "經濟型"
            }
        ],
        "total_sold": "32",
        "skus": {
            "sku": [
                {
                    "price": 480,
                    "total_price": 0,
                    "orginal_price": 480,
                    "properties": "31480:14306495906;1627207:28321",
                    "properties_name": "31480:14306495906:幾人坐:腳踏90*60*48cm;1627207:28321:顏色分類:乳白色 尺寸顏色可定製",
                    "quantity": 200,
                    "sku_id": "4881047531343"
                },
                {
                    "price": 1688,
                    "total_price": 0,
                    "orginal_price": 1688,
                    "properties": "31480:14306495907;1627207:28321",
                    "properties_name": "31480:14306495907:幾人坐:雙人165*95*67cm;1627207:28321:顏色分類:乳白色 尺寸顏色可定製",
                    "quantity": 148,
                    "sku_id": "4881047531344"
                },
                {
                    "price": 2088,
                    "total_price": 0,
                    "orginal_price": 2088,
                    "properties": "31480:14306495908;1627207:28321",
                    "properties_name": "31480:14306495908:幾人坐:三人210*95*67cm;1627207:28321:顏色分類:乳白色 尺寸顏色可定製",
                    "quantity": 200,
                    "sku_id": "4881047531345"
                },
                {
                    "price": 968,
                    "total_price": 0,
                    "orginal_price": 968,
                    "properties": "31480:14306495909;1627207:28321",
                    "properties_name": "31480:14306495909:幾人坐:單人100*95*67cm;1627207:28321:顏色分類:乳白色 尺寸顏色可定製",
                    "quantity": 200,
                    "sku_id": "4881047531346"
                },
                {
                    "price": 2388,
                    "total_price": 0,
                    "orginal_price": 2388,
                    "properties": "31480:21480914361;1627207:28321",
                    "properties_name": "31480:21480914361:幾人坐:四人位240*95*67cm;1627207:28321:顏色分類:乳白色 尺寸顏色可定製",
                    "quantity": 200,
                    "sku_id": "5039985183001"
                },
                {
                    "price": 3188,
                    "total_price": 0,
                    "orginal_price": 3188,
                    "properties": "31480:21480914362;1627207:28321",
                    "properties_name": "31480:21480914362:幾人坐:大四人320*95*76cm;1627207:28321:顏色分類:乳白色 尺寸顏色可定製",
                    "quantity": 200,
                    "sku_id": "5039985183002"
                },
                {
                    "price": 3400,
                    "total_price": 0,
                    "orginal_price": 3400,
                    "properties": "31480:1387571900;1627207:28321",
                    "properties_name": "31480:1387571900:幾人坐:3米貴妃沙發;1627207:28321:顏色分類:乳白色 尺寸顏色可定製",
                    "quantity": 200,
                    "sku_id": "5039984824000"
                },
                {
                    "price": 3000,
                    "total_price": 0,
                    "orginal_price": 3000,
                    "properties": "31480:32527954;1627207:28321",
                    "properties_name": "31480:32527954:幾人坐:定製尺寸;1627207:28321:顏色分類:乳白色 尺寸顏色可定製",
                    "quantity": 200,
                    "sku_id": "5039985183003"
                }
            ]
        },
        "seller_id": "2568161054",
        "sales": 32,
        "shop_id": "567158267",
        "props_list": {
            "1627207:28321": "顏色分類:乳白色 尺寸顏色可定製",
            "31480:14306495906": "幾人坐:腳踏90*60*48cm",
            "31480:14306495907": "幾人坐:雙人165*95*67cm",
            "31480:14306495908": "幾人坐:三人210*95*67cm",
            "31480:14306495909": "幾人坐:單人100*95*67cm",
            "31480:21480914361": "幾人坐:四人位240*95*67cm",
            "31480:21480914362": "幾人坐:大四人320*95*76cm",
            "31480:1387571900": "幾人坐:3米貴妃沙發",
            "31480:32527954": "幾人坐:定製尺寸"
        },
        "seller_info": {
            "nick": "惜情yqq1127",
            "item_score": 4.97842,
            "score_p": 4.98201,
            "delivery_score": 4.97122,
            "shop_type": "",
            "user_num_id": "2568161054",
            "sid": "567158267",
            "title": "",
            "zhuy": "
            "cert": null,
            "open_time": "",
            "credit_score": null,
            "shop_name": "現代布藝沙發"
        },
        "tmall": false,
        "error": "",
        "location": "江蘇南通",
        "data_from": "Ha",
        "has_discount": "false",
        "is_promotion": "false",
        "promo_type": null,
        "props_img": {
            "1627207:28321": "!!2568161054.jpg"
        },
        "format_check": "ok",
        "desc_img": [
            "!!2568161054.jpg",
            "!!2568161054.jpg",
            "!!2568161054.jpg",
            "!!2568161054.jpg",
            "!!2568161054.jpg",
            "!!2568161054.jpg",
            "!!2568161054.jpg",
            "!!2568161054.jpg",
            "!!2568161054.jpg",
            "!!2568161054.jpg",
            "!!2568161054.jpg",
            "!!2568161054.jpg",
            "!!2568161054.jpg",
            "!!2568161054.jpg",
            "!!2568161054.jpg",
            "!!2568161054.jpg",
            "!!2568161054.jpg",
            "!!2568161054.jpg",
            "!!2568161054.jpg"
        ],
        "shop_item": [],
        "relate_items": []
    },
    "error": "",
    "secache": "4ad7ad2480af253fec9c2fd4daa266bb",
    "secache_time": 1681958279,
    "secache_date": "2023-04-20 10:37:59",
    "translate_status": "",
    "translate_time": 0,
    "language": {
        "default_lang": "cn",
        "current_lang": "cn"
    },
    "reason": "",
    "error_code": "0000",
    "cache": 0,
    "api_info": "today:20 max:10000 all[263=20+207+36];expires:2030-12-31",
    "execution_time": "1.285",
    "server_time": "Beijing/2023-04-20 10:37:59",
    "client_ip": "106.6.36.60",
    "call_args": {
        "num_iid": "652874751412",
        "is_promotion": "1"
    },
    "api_type": "taobao",
    "translate_language": "zh-CN",
    "translate_engine": "baidu",
    "server_memory": "6.07MB",
    "request_id": "gw-1.6440a58613a0e",
    "last_id": "1690624398"
}

錯誤碼解釋


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/70026630/viewspace-2947073/,如需轉載,請註明出處,否則將追究法律責任。

相關文章