tag:blogger.com,1999:blog-8326467133854092913.post4658531925583893006..comments2023-06-02T08:41:00.844+01:00Comments on smartrics: RestFixture v2.0smartricshttp://www.blogger.com/profile/07295654362099098666noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-8326467133854092913.post-20276755177765940122012-11-15T07:54:37.770+00:002012-11-15T07:54:37.770+00:00Thank you for developing RestFixture for FitNesse....Thank you for developing RestFixture for FitNesse. It looks to be a highly versatile tool. Unfortunately, I have only been able to get it to successfully execute GET and DELETE requests. My attempts to execute PUT requests have failed with the error (... displayed in the body 'expectation' cell):<br /><br />...<br /> body><br /> Bad request<br /><br /> <br /> For request 'PUT /organisation' [Invalid XML]<br /> <br /><br /> </body<br />...<br /><br /><br />The 'edit' view of my test:<br /><br />!define TEST_SYSTEM {slim}<br /><br />!path C:\workspace\fitnesse\TestREST\lib\*<br /><br /><br />|Table:smartrics.rest.fitnesse.fixture.RestFixture | http://yellowtest-vm.yonder.hubbub.com.au:9000 |<br />|GET | /organisation | 200 | Content-Type : text/plain | "Yarris Pty Ltd" |<br />|setBody | {"_typeHint":"models.party.Organisation","names":[{"_typeHint":"models.party.PartyName","id":1,"surName":"Peter Test 5","nameType":"","validFrom":"2012-10-18T05:19:43Z","validTo":"2012-10-18T05:19:43Z"}],"externalIdentifiers":[{"_typeHint":"models.party.identifiers.ABN","abnNumber":0}],"contacts":[{"_typeHint":"models.locator.Address","floor":1,"room":"Back Room","unitNumber":3,"streetNumber":0,"streetName":"","suburb":"","city":"Melbourne","state":"","country":"Australia","postCode":3068,"lat":0,"long":0}]}|<br />|PUT | /organisation ||| no-body |Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8326467133854092913.post-6671738177448615662012-03-22T22:59:59.836+00:002012-03-22T22:59:59.836+00:00Mike the best thing to do is a pull request on git...Mike the best thing to do is a pull request on github... We can discuss your changes there. I am happy to merge if the change is fully implemented (including unit tests and if necessary updates to the cat/live docs )smartricshttps://www.blogger.com/profile/07295654362099098666noreply@blogger.comtag:blogger.com,1999:blog-8326467133854092913.post-50576404450071795582012-03-22T21:40:39.585+00:002012-03-22T21:40:39.585+00:00smartrics, I found it difficult to find a place to...smartrics, I found it difficult to find a place to post the question. Hope this is OK-place to do it. Had started using RestFixture in Fitnesse last week. I felt like writing js, uploading it to Fitnesse, and then importing .js file from URL. I modified your code and with few changes was able to add the functionality. I would like to share / merge the code with yours so it can be maintained with future releases. Also, added functionality to report error conditions from js better (more detail that current 'not found'). Please contact me and / or let me know how to better contact u about this.<br />Cheers,<br />MikeAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8326467133854092913.post-89810143759403581072012-02-01T11:46:20.204+00:002012-02-01T11:46:20.204+00:00Jon, I'll check the sequence diagrams
as for ...Jon, I'll check the sequence diagrams<br /><br />as for the URI issue, can you post an example and the intended behaviour?<br /><br />please use the github issue tracker for the rest fixture<br /><br />thankssmartricshttps://www.blogger.com/profile/07295654362099098666noreply@blogger.comtag:blogger.com,1999:blog-8326467133854092913.post-49696621958931965382012-01-31T18:46:15.537+00:002012-01-31T18:46:15.537+00:00Also, I haven't figured out how to get the seq...Also, I haven't figured out how to get the sequence diagrams to work. When I go to the smartrics/RestFixture/RestFixture-2.0.beta.2.html page, none of the sequence diagrams appear. Should they?<br /><br />And when I try to use RestFixtureWithSeq on my own pages either nothing happens (I don't see a diagram), or I get an exception on the POST:<br /><br />Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0<br /> at java.util.ArrayList.rangeCheck(ArrayList.java:571)<br /> at java.util.ArrayList.get(ArrayList.java:349)<br /> at smartrics.rest.fitnesse.fixture.RestFixtureWithSeq.POST(RestFixtureWithSeq.java:216)Anonymoushttps://www.blogger.com/profile/13808268190156758351noreply@blogger.comtag:blogger.com,1999:blog-8326467133854092913.post-40673277823035512622012-01-31T18:11:18.312+00:002012-01-31T18:11:18.312+00:00Thanks for creating the RestFixture.
In our resou...Thanks for creating the RestFixture.<br /><br />In our resources we frequently have fields whose values are URIs referring to other resources (e.g. http://sfftcpod:8080/account/1234). I want to use those URIs in subsequent requests, but that is not possible (or doesn't seem so) because the URI is going to be appended to the base URL that is specified in the smartrics.rest.fitnesse.fixture.RestFixture<br /><br />The RestFixture instance declaration requires a non-null base URL.<br /><br />Is there a way to avoid that?Anonymoushttps://www.blogger.com/profile/13808268190156758351noreply@blogger.comtag:blogger.com,1999:blog-8326467133854092913.post-48352651667580405612011-12-01T23:15:11.659+00:002011-12-01T23:15:11.659+00:00please post the issue here https://github.com/smar...please post the issue here https://github.com/smartrics/restfixture/issues<br /><br />explaining what result you get from a fixture with the config you have triedsmartricshttps://www.blogger.com/profile/07295654362099098666noreply@blogger.comtag:blogger.com,1999:blog-8326467133854092913.post-73626038497827167562011-10-26T17:07:09.623+01:002011-10-26T17:07:09.623+01:00Does RestFixture offer any support for basic pre-a...Does RestFixture offer any support for basic pre-authentication?<br /><br />I begin my test with:<br />|!-smartrics.rest.fitnesse.fixture.RestFixtureConfig-!|<br />|http.basicauth.username|'admin'|<br />|http.basicauth.password|'admin'|<br />|restfixure.default.headers|!-Accept: application/xml<br />Accept-Charset: utf-8<br />Keep-Alive: 300<br />Connection: keep-alive-!|<br /><br />This does not seem to work.Anonymousnoreply@blogger.com