Post

Postman

Postman

Workspaces

workspaces-1 workspaces-2 workspaces-3 workspaces-4 workspaces-5

new

new-1 new-1

HTTP

http-1 http-2 http-3 http-4 http-5 http-6 http-7 http-8

GRPC

grpc-1 grpc-2 grpc-3 grpc-4 grpc-5 grpc-6 grpc-7 grpc-8 grpc-9 grpc-10

WebSocket

WebSocket-1

environments

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
pm.test("Reuest Status ",function() {
    pm.response.to.have.status(200);
});

var requestJson = pm.response.json();

// console.log("获取参数",requestJson);

if (requestJson.En == 0){

    var UserInfo = JSON.parse(CryptoJS.enc.Base64.parse(requestJson.Data).toString(CryptoJS.enc.Utf8))
    console.log("userInfo :",UserInfo)
    pm.environment.set("UserId", UserInfo.UserId);
    pm.environment.set("Token", UserInfo.Token);
    tests["Login"] = true

}else{  
    tests["Login"] = "登录失败"+requestJson.En
}

environments-1 environments-1 environments-1 environments-1

This post is licensed under CC BY 4.0 by the author.