上面给出了我的上传代码,我如何在 API 自动化中上传文件
it('upload',function(){
const token = Cypress.env('token');
cy.request({
method:'POST',
url:"/file/upload",
headers: {
authorization : 'Bearer ' + accessToken
},
body: {
"file": ""
}
})
})