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
import{check}from'k6'importexecfrom'k6/x/exec';exportfunctionsetup(){}exportfunctionteardown(){}exportdefaultfunction(){check(1,{"1 === 1": n=>n===1})check(2,{"2 === 2": n=>n===2})try{letout=exec.command("ls",["non_existent_file"])//should be the same behavior as//throw new Error('My error message')}catch(e){console.log(e.message)}check(3,{"3 === 3": n=>n===3})}
K6 documentation recommends the use of k6 chaijs for handling errors, using the describe function.
However it does not work with tests that uses exec.command, a failed command execution exits k6 run as well :(
steps to reproduce
expected behavior
actual behavior
The text was updated successfully, but these errors were encountered: