-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hook file is not working #32
Comments
What is your problem? |
@cybertk Both the cases have incorrect activityid, so I am expecting these test cases should be fail. But when I am running the following command all the test passed. So to debug this I just ran the raml file without hook file: Result of the above command is also same as the first command, so its look like abao is not reading hook file. Though it says: Found Hookfiles: hook.coffee Please let me know if you need more information. |
You can define only one test for each case(response code) in Abao. So for your case, you defined two tests/hooks for If you want test the error case of your API, you should define it in your RAML. e.g. Your API will response 400 if
I think Abao should print a warning message for your case, what's your advice? |
For example, |
|
@cybertk Abao test will run with activityid 567*** (Hook file), is that correct? |
Correct. |
@agrover8 I have an idea for your condition, test multiple test cases for one case. You can write multiple hooks, then run Abao multiple times with different hook. Such as,
|
You can open a feature request either, we will implement it in future. |
@cybertk |
Yes, you can. Hook file is just a normal javascript/coffeescript source file, you can do whatever you want. |
@cybertk |
Yes. Do whatever javascript can do |
Filed #35 for multi test case. I had some working example going of parameter passing using some global context variable to define things. Something roughly like... context = {} after < test 1 > ... before < test 2 > ... @agrover8 is your hook file working now? |
Hi,
I have created hook coffee script which looks like abao is not reading.
My RAML File look like:
Hook file:
Can anyone help me on this?
The text was updated successfully, but these errors were encountered: