Closed sir-farfan closed 9 months ago
@sir-farfan It is easily possible via script in the file to reset the environments, but this would always be for all executions. This is probably rather undesirable. I would suggest that I include these changes.
Does that sound good? It will take a few days though, as I just started a little side project.
Hi @AnWeber yeah, that sounds good. I appreciate the intention, the plugin has been a big help so far :)
The feature will be delivered with the next version. I will release this in the next few days, probably on Sunday.
Where do you set testRunResetEnvBeforeRun
? I added it to the .httpyac.config.js
file but it made no difference.
module.exports = {
"log": {
"level": "debug",
"supportAnsiColors": true,
},
"cookieJarEnabled": true,
"envDirName": 'env',
"proxyExcludeList": [
"localhost"
],
"request": {
"https": {
"rejectUnauthorized": false
}
},
"testRunResetEnvBeforeRun": true
}
I assume that every time I run tests from the Testing
menu, it would execute httpYac: Reset Environments
, but it doesn't seem to do so, at least, I do not see it generating a new token every time I run a file or folder.
Hello Because reasons, I need to remove all cookies and variables before running a whole file.
"httpYac: Reset Environments" is at the top when I press F1.
I only need to reset when running all the tests in a file, not when I'm sending individual requests one by one.
Sometimes I forget to do it and half of the tests fails xD Is there a configuration or directive I can put somewhere to make that happen automatically?