You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We often use a test mode, which includes a server and client, so that we can easily control the steps of each test case. Usually the client is only responsible for generating test cases and sending test cases, and the server is responsible for the real test case execution. implement. For example, Python builds a client, which is only responsible for sending JSON test cases. As a server, cypress is responsible for receiving JSON test cases, translating them into test cases for execution, and returning the direct results of the current test cases to the client. If Cypress doesn't support While(TRUE) mode, how can I dynamically add test cases to Cypress execution thread? In the Python Asyncio library, they provide the asyncio.run_coroutine_threadsafe function, which allows users to dynamically add tasks to the loop thread, but why doesn't Cypress provide the corresponding function?
Why is this needed?
We need Api that allow user dynamiclly append case to Cypress
constsocket=io("http://localhost:5000");varui_case=null;describe("template spec",()=>{before(()=>{cy.log("set up socket client");socket.on("connect",()=>{console.log("socket connect");});socket.on("disconnect",()=>{console.log("socket disconnect");});socket.on("connect_error",(e)=>{console.log("socket connect error",e.message);});socket.on("uicase",(data)=>{console.log("get ui case data");ui_case=data;});});it("wait new ui case data",()=>{cy.log("wait for new case");while(true){//test ui caseif(ui_case!=null){// translate json data to cypress api and excute caseui_case=null;}}});});
Other
No response
The text was updated successfully, but these errors were encountered:
What would you like?
We often use a test mode, which includes a server and client, so that we can easily control the steps of each test case. Usually the client is only responsible for generating test cases and sending test cases, and the server is responsible for the real test case execution. implement. For example, Python builds a client, which is only responsible for sending JSON test cases. As a server, cypress is responsible for receiving JSON test cases, translating them into test cases for execution, and returning the direct results of the current test cases to the client. If Cypress doesn't support While(TRUE) mode, how can I dynamically add test cases to Cypress execution thread? In the Python Asyncio library, they provide the asyncio.run_coroutine_threadsafe function, which allows users to dynamically add tasks to the loop thread, but why doesn't Cypress provide the corresponding function?
Why is this needed?
We need Api that allow user dynamiclly append case to Cypress
Other
No response
The text was updated successfully, but these errors were encountered: