Contributions
Re: Refactoring a Request so it change in all its test cases
Very interesting. It feels like a bit "overkill" in the sense that I think this shouldn't be necesary to begin with, but I have spent part of the afternoon researching other API Testing tools and none of them seems to implement it(although I'm starting to doubt my researching skills at this point), so I think this is quite helpful. Thank you very much. I'll implement it.7 years agoPlace ReadyAPI QuestionsReadyAPI Questions4KViews0likes1CommentRe: Refactoring a Request so it change in all its test cases
Thank for the feedback, but I don't understand what do you mean by using scripts:mansad: I don't want to change the tests dinamically, I'm only talking about changing them during maintenance, or whenever something change in the API. I already have groovy scripts to change values and parameters during test execution.7 years agoPlace ReadyAPI QuestionsReadyAPI Questions4KViews0likes3CommentsRe: Refactoring a Request so it change in all its test cases
As I said, I am already using Property Expansion (I called it parameters, my bad), but I cannot use property parameters for all these values for the only reason that each request add, or remove, values. And, besides that, my problem right now is with refactoring and maintaining the code, not with defining each test. All tests are done, everything is finished and functional as it is. The problem si that now I realized that, for instance, the T1S1, T2S1 and T2S2 don't need to use the value "startAt", so I planned on deleting them from the JSON, but that would require deleting each instance manually form both those 3 request, and every single use of these requests on my tests. I can do that now for this problem, but I have more changes to do, and this tests are suppose to be useful beyond this week. If I will have to change them all manually on each test case every single time, I'm afraid SoapUI is neither useful for this project, nor for any other project for now on. Sorry for being so pessimistic, I'm a bit frustrated right now.7 years agoPlace ReadyAPI QuestionsReadyAPI Questions4KViews0likes6CommentsRefactoring a Request so it change in all its test cases
I have been using the unlisenced version of SoapUI for a couple of weeks, up until I encountered this problem. I built a project full of REST requests, each of them with a json body with different data. After doing this, I build multiple test cases, each of these featuring those request and adding those asserts. But now, after 20 hours of work, I find out that whenever change I make on those requests, doesn't change on the tests cases, which means that I would have to manually modify 30 tests, each of them with 10+ requests. While researching I found out that the PRO version of the application allows you to do that, and so I got a trial versiĆ³n to figure out if it does. I created a new proyect, added a new request, defined a json body, and then added a simple test with just that request. No matter the times I change the original request, it doesn't change on the test case. Refactoring ask me for a WADL which I don't have, nor do I plan to have, I just want to change the values of the fields on my json request. I'll add some examples. This is my request, it is called T0S0_Basic_Valid, and it send different values, one of them being "origin", which was "SEI", and now I want "BUS". I also added a parameter for the value "client", which was hardcoded, but now I need it to be able to change. This is my test case. One of the first steps is calling this request, T0S0_Basic_Valid. Now, as you can see, the values didn't change, so now I have to manually change them. As you can see, I have many similar requests (T1S1, T2S1, etc). Each of them have a similar structure, but they change their inner values, maybe adding new fields on the JSON. I cannot make them all parameters, nor can I constantly change their value inside each test case, as I will requiere to change the request for time to time. Is there any solution? How can I refactor these requests? Thank you.Solved4KViews0likes8Comments