You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by Timothy Farkas <tf...@mapr.com> on 2017/08/24 19:55:03 UTC
DrillRestServer Tests
Hi All,
I want to add some unit tests for a new rest endpoint I added to the DrillRestServer. I've been looking but I couldn't find an existing test for rest endpoints, or a rest api client. Does anyone have any pointers to where the rest api tests are kept and if there is a pre-existing rest api client?
Thanks,
Tim
Re: DrillRestServer Tests
Posted by Timothy Farkas <tf...@mapr.com>.
Hey Kunal,
I tried rest-assured out for my rest api unit tests and It works. I'll include it as part of my PR for DRILL-5723.
Thanks,
Tim
________________________________
From: Timothy Farkas
Sent: Friday, August 25, 2017 2:46:53 PM
To: dev@drill.apache.org
Subject: Re: DrillRestServer Tests
I got something that does more or less what I want. It is easy to start a drill bit with the web server in tests now with the existing Fixture infrastructure.
FixtureBuilder builder = ClusterFixture.builder().
configProperty(ExecConstants.HTTP_ENABLE, true)
ClusterFixture cluster = builder.build()
Then I added a RestClientFixture which has the methods I wanted to fetch system options
from the rest api.
RestClientFixture restClientFixture = cluster.restClientFixture()
restClientFixture.getStatusOption(MOCK_PROPERTY)
Underneath the hood I'm using the jersey client in the RestClientFixture to talk to the Webserver rest api,
but it seems like rest-assured is a much more wholistic solution than jersey. I'll investigate for a couple
hours to see if I can replace the jersey client with rest-assured. Thanks for letting me know about the tool Kunal!
Thanks,
Tim
________________________________
From: Kunal Khatua <kk...@mapr.com>
Sent: Friday, August 25, 2017 10:45:58 AM
To: dev@drill.apache.org
Subject: RE: DrillRestServer Tests
Krystal pointed out to an existing tool that allows testing for REST APIs.
https://github.com/rest-assured/rest-assured
Unfortunately, we're currently running short of hands in getting a good robust prototype for this.
Is anyone interested in volunteering?
-----Original Message-----
From: Paul Rogers [mailto:progers@mapr.com]
Sent: Friday, August 25, 2017 10:01 AM
To: dev@drill.apache.org
Subject: Re: DrillRestServer Tests
To simplify code reviews in this area, should we add tests? Might be mighty hard to “mentally execute” in lieu of tests…
- Paul
> On Aug 25, 2017, at 9:40 AM, Parth Chandra <pa...@apache.org> wrote:
>
> Don't think there are any unit tests, and again there is no rest api
> client. The UI is the only test tool, sadly.
>
>
> On Thu, Aug 24, 2017 at 12:55 PM, Timothy Farkas <tf...@mapr.com> wrote:
>
>> Hi All,
>>
>> I want to add some unit tests for a new rest endpoint I added to the
>> DrillRestServer. I've been looking but I couldn't find an existing
>> test for rest endpoints, or a rest api client. Does anyone have any
>> pointers to where the rest api tests are kept and if there is a
>> pre-existing rest api client?
>>
>> Thanks,
>> Tim
>>
>>
Re: DrillRestServer Tests
Posted by Timothy Farkas <tf...@mapr.com>.
I got something that does more or less what I want. It is easy to start a drill bit with the web server in tests now with the existing Fixture infrastructure.
FixtureBuilder builder = ClusterFixture.builder().
configProperty(ExecConstants.HTTP_ENABLE, true)
ClusterFixture cluster = builder.build()
Then I added a RestClientFixture which has the methods I wanted to fetch system options
from the rest api.
RestClientFixture restClientFixture = cluster.restClientFixture()
restClientFixture.getStatusOption(MOCK_PROPERTY)
Underneath the hood I'm using the jersey client in the RestClientFixture to talk to the Webserver rest api,
but it seems like rest-assured is a much more wholistic solution than jersey. I'll investigate for a couple
hours to see if I can replace the jersey client with rest-assured. Thanks for letting me know about the tool Kunal!
Thanks,
Tim
________________________________
From: Kunal Khatua <kk...@mapr.com>
Sent: Friday, August 25, 2017 10:45:58 AM
To: dev@drill.apache.org
Subject: RE: DrillRestServer Tests
Krystal pointed out to an existing tool that allows testing for REST APIs.
https://github.com/rest-assured/rest-assured
Unfortunately, we're currently running short of hands in getting a good robust prototype for this.
Is anyone interested in volunteering?
-----Original Message-----
From: Paul Rogers [mailto:progers@mapr.com]
Sent: Friday, August 25, 2017 10:01 AM
To: dev@drill.apache.org
Subject: Re: DrillRestServer Tests
To simplify code reviews in this area, should we add tests? Might be mighty hard to “mentally execute” in lieu of tests…
- Paul
> On Aug 25, 2017, at 9:40 AM, Parth Chandra <pa...@apache.org> wrote:
>
> Don't think there are any unit tests, and again there is no rest api
> client. The UI is the only test tool, sadly.
>
>
> On Thu, Aug 24, 2017 at 12:55 PM, Timothy Farkas <tf...@mapr.com> wrote:
>
>> Hi All,
>>
>> I want to add some unit tests for a new rest endpoint I added to the
>> DrillRestServer. I've been looking but I couldn't find an existing
>> test for rest endpoints, or a rest api client. Does anyone have any
>> pointers to where the rest api tests are kept and if there is a
>> pre-existing rest api client?
>>
>> Thanks,
>> Tim
>>
>>
RE: DrillRestServer Tests
Posted by Kunal Khatua <kk...@mapr.com>.
Krystal pointed out to an existing tool that allows testing for REST APIs.
https://github.com/rest-assured/rest-assured
Unfortunately, we're currently running short of hands in getting a good robust prototype for this.
Is anyone interested in volunteering?
-----Original Message-----
From: Paul Rogers [mailto:progers@mapr.com]
Sent: Friday, August 25, 2017 10:01 AM
To: dev@drill.apache.org
Subject: Re: DrillRestServer Tests
To simplify code reviews in this area, should we add tests? Might be mighty hard to “mentally execute” in lieu of tests…
- Paul
> On Aug 25, 2017, at 9:40 AM, Parth Chandra <pa...@apache.org> wrote:
>
> Don't think there are any unit tests, and again there is no rest api
> client. The UI is the only test tool, sadly.
>
>
> On Thu, Aug 24, 2017 at 12:55 PM, Timothy Farkas <tf...@mapr.com> wrote:
>
>> Hi All,
>>
>> I want to add some unit tests for a new rest endpoint I added to the
>> DrillRestServer. I've been looking but I couldn't find an existing
>> test for rest endpoints, or a rest api client. Does anyone have any
>> pointers to where the rest api tests are kept and if there is a
>> pre-existing rest api client?
>>
>> Thanks,
>> Tim
>>
>>
Re: DrillRestServer Tests
Posted by Paul Rogers <pr...@mapr.com>.
To simplify code reviews in this area, should we add tests? Might be mighty hard to “mentally execute” in lieu of tests…
- Paul
> On Aug 25, 2017, at 9:40 AM, Parth Chandra <pa...@apache.org> wrote:
>
> Don't think there are any unit tests, and again there is no rest api
> client. The UI is the only test tool, sadly.
>
>
> On Thu, Aug 24, 2017 at 12:55 PM, Timothy Farkas <tf...@mapr.com> wrote:
>
>> Hi All,
>>
>> I want to add some unit tests for a new rest endpoint I added to the
>> DrillRestServer. I've been looking but I couldn't find an existing test for
>> rest endpoints, or a rest api client. Does anyone have any pointers to
>> where the rest api tests are kept and if there is a pre-existing rest api
>> client?
>>
>> Thanks,
>> Tim
>>
>>
Re: DrillRestServer Tests
Posted by Parth Chandra <pa...@apache.org>.
Don't think there are any unit tests, and again there is no rest api
client. The UI is the only test tool, sadly.
On Thu, Aug 24, 2017 at 12:55 PM, Timothy Farkas <tf...@mapr.com> wrote:
> Hi All,
>
> I want to add some unit tests for a new rest endpoint I added to the
> DrillRestServer. I've been looking but I couldn't find an existing test for
> rest endpoints, or a rest api client. Does anyone have any pointers to
> where the rest api tests are kept and if there is a pre-existing rest api
> client?
>
> Thanks,
> Tim
>
>