Re: TDD/Unit testing ATS plugins

2014-03-10 Thread James Peach
On Mar 8, 2014, at 5:28 PM, Alan Cabrera wrote: > So, I took a crack at this and it seems that InkAPI.cc has a mix of API and > utility code; utility code being calls such as TSUrlSchemeGet(). > > To me it seems to only make sense to mock API calls such as > TSPluginRegister() and _TSmall

Re: TDD/Unit testing ATS plugins

2014-03-08 Thread Alan Cabrera
So, I took a crack at this and it seems that InkAPI.cc has a mix of API and utility code; utility code being calls such as TSUrlSchemeGet(). To me it seems to only make sense to mock API calls such as TSPluginRegister() and _TSmalloc(). But how will mocked tests execute code that uses both

Re: TDD/Unit testing ATS plugins

2014-02-26 Thread Alan Cabrera
Thanks! I’m going to start tinkering around in https://github.com/maguro/trafficserver Feel free to watch or, even better, help! Regards, Alan On Feb 25, 2014, at 3:07 PM, James Peach wrote: > On Feb 24, 2014, at 7:51 PM, Alan Cabrera wrote: > >> I wanted to start goofing around with thi

Re: TDD/Unit testing ATS plugins

2014-02-25 Thread James Peach
On Feb 24, 2014, at 7:51 PM, Alan Cabrera wrote: > I wanted to start goofing around with this in a public place so people can > comment/participate. Would it make sense to do this on github and if it ever > gels into something useful I could submit a patch? Take a look at ci/tsqa. I started a

Re: TDD/Unit testing ATS plugins

2014-02-25 Thread Leif Hedstrom
> On Feb 24, 2014, at 8:51 PM, Alan Cabrera wrote: > > I wanted to start goofing around with this in a public place so people can > comment/participate. Would it make sense to do this on github and if it ever > gels into something useful I could submit a patch? Yep, just fork the official A

Re: TDD/Unit testing ATS plugins

2014-02-24 Thread Alan Cabrera
I wanted to start goofing around with this in a public place so people can comment/participate. Would it make sense to do this on github and if it ever gels into something useful I could submit a patch? Regards, Alan On Jan 10, 2014, at 11:41 AM, Alan Cabrera wrote: > +1 a good mocked libra

Re: TDD/Unit testing ATS plugins

2014-01-10 Thread Alan Cabrera
+1 a good mocked library would be awesome. Do more experienced ATS developers know of any blockers to us writing a mock library for testing? Regards, Alan On Jan 10, 2014, at 11:08 AM, Shu Kit Chan wrote: > That's just unit tests for utilities and helper classes for the plugin. > I also wa

Re: TDD/Unit testing ATS plugins

2014-01-10 Thread Shu Kit Chan
That's just unit tests for utilities and helper classes for the plugin. I also want a stub library, too, for writing unit tests for plugin. On Fri, Jan 10, 2014 at 10:59 AM, James Peach wrote: > On Jan 3, 2014, at 8:48 AM, Alan D. Cabrera wrote: > > > > > On Jan 2, 2014, at 9:04 AM, James Peac

Re: TDD/Unit testing ATS plugins

2014-01-10 Thread James Peach
On Jan 3, 2014, at 8:48 AM, Alan D. Cabrera wrote: > > On Jan 2, 2014, at 9:04 AM, James Peach wrote: > >> On Dec 31, 2013, at 2:44 PM, Alan D. Cabrera wrote: >> >>> >>> On Dec 31, 2013, at 1:53 PM, James Peach wrote: >>> On Dec 31, 2013, at 8:44 AM, Alan D. Cabrera wrote: >>>

Re: TDD/Unit testing ATS plugins

2014-01-03 Thread Alan D. Cabrera
On Jan 2, 2014, at 9:04 AM, James Peach wrote: > On Dec 31, 2013, at 2:44 PM, Alan D. Cabrera wrote: > >> >> On Dec 31, 2013, at 1:53 PM, James Peach wrote: >> >>> On Dec 31, 2013, at 8:44 AM, Alan D. Cabrera wrote: >>> I'm looking for an example of an ATS plugin that has extensive u

Re: TDD/Unit testing ATS plugins

2014-01-02 Thread Bryan Call
It was part of the unit tests for the cookie remap plugin. I ported the plugin to ATS along with the unit tests and we are using it in production. I think it would be best to open source both the stub and the plugin and then move the stub parts into a common directory. The plugin does use some

Re: TDD/Unit testing ATS plugins

2014-01-02 Thread James Peach
On Dec 31, 2013, at 2:44 PM, Alan D. Cabrera wrote: > > On Dec 31, 2013, at 1:53 PM, James Peach wrote: > >> On Dec 31, 2013, at 8:44 AM, Alan D. Cabrera wrote: >> >>> I'm looking for an example of an ATS plugin that has extensive unit tests. >> >> There are none. >> >>> I'm having problem

Re: TDD/Unit testing ATS plugins

2013-12-31 Thread Alan D. Cabrera
On Dec 31, 2013, at 1:53 PM, James Peach wrote: > On Dec 31, 2013, at 8:44 AM, Alan D. Cabrera wrote: > >> I'm looking for an example of an ATS plugin that has extensive unit tests. > > There are none. > >> I'm having problems linking my Boost unit tests against the plugin library >> for ob

Re: TDD/Unit testing ATS plugins

2013-12-31 Thread James Peach
On Dec 31, 2013, at 8:44 AM, Alan D. Cabrera wrote: > I'm looking for an example of an ATS plugin that has extensive unit tests. There are none. > I'm having problems linking my Boost unit tests against the plugin library > for obvious reasons, it's a module not a shared library. > > I tried

Re: TDD/Unit testing ATS plugins

2013-12-31 Thread Alan D. Cabrera
On Dec 31, 2013, at 10:11 AM, Leif Hedstrom wrote: > > On Dec 31, 2013, at 9:44 AM, Alan D. Cabrera wrote: > >> I'm looking for an example of an ATS plugin that has extensive unit tests. >> >> I'm having problems linking my Boost unit tests against the plugin library >> for obvious reasons,

TDD/Unit testing ATS plugins

2013-12-31 Thread Alan D. Cabrera
I'm looking for an example of an ATS plugin that has extensive unit tests. I'm having problems linking my Boost unit tests against the plugin library, for obvious reasons, it's a module not a shared library. I tried setting up an internal static library that the tests would link against but can

Re: TDD/Unit testing ATS plugins

2013-12-31 Thread Leif Hedstrom
On Dec 31, 2013, at 9:44 AM, Alan D. Cabrera wrote: > I'm looking for an example of an ATS plugin that has extensive unit tests. > > I'm having problems linking my Boost unit tests against the plugin library > for obvious reasons, it's a module not a shared library. > > I tried setting up an

TDD/Unit testing ATS plugins

2013-12-31 Thread Alan D. Cabrera
I'm looking for an example of an ATS plugin that has extensive unit tests. I'm having problems linking my Boost unit tests against the plugin library for obvious reasons, it's a module not a shared library. I tried setting up an internal static library that the tests would link against but can'