You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by Karthik Sivaraman <ka...@outlook.com> on 2016/04/22 16:01:31 UTC

Unit testing for plugin

Hi


We are planning to maintain a plug-in that does third party feed based URL filtering. Are there any recommendations for unit test/regression test frameworks? What does trafficserver use for its unit/regression tests?


Thanks

Karthik

Re: Unit testing for plugin

Posted by Jason Kenny <jk...@yahoo-inc.com.INVALID>.
Have to remember the joy of e-mail at yahoo Let me try to get a good link to catch
https://github.com/philsquared/Catch


Jason      From: Jason Kenny <jk...@yahoo-inc.com.INVALID>
 To: "dev@trafficserver.apache.org" <de...@trafficserver.apache.org> 
 Sent: Friday, April 22, 2016 9:56 AM
 Subject: Re: Unit testing for plugin
   
I am planning on proposing the use of philsquared/Catch
  
|  
|  
|  
|  |    |

  |

  |
|  
|    |  
philsquared/Catch
 Catch - A modern, C++-native, header-only, framework for unit-tests, TDD and BDD  |  |

  |

  |

 
for unit testing as part of my work on fixing up testing ATS within Yahoo. I have something different for regression/gold/production/TSQA testing
Jason

      From: Karthik Sivaraman <ka...@outlook.com>
 To: "dev@trafficserver.apache.org" <de...@trafficserver.apache.org> 
 Sent: Friday, April 22, 2016 9:01 AM
 Subject: Unit testing for plugin
  
Hi


We are planning to maintain a plug-in that does third party feed based URL filtering. Are there any recommendations for unit test/regression test frameworks? What does trafficserver use for its unit/regression tests?


Thanks

Karthik



  

Re: Unit testing for plugin

Posted by Jason Kenny <jk...@yahoo-inc.com.INVALID>.
I am planning on proposing the use of philsquared/Catch
  
|  
|   
|   
|   |    |

   |

  |
|  
|    |  
philsquared/Catch
 Catch - A modern, C++-native, header-only, framework for unit-tests, TDD and BDD  |   |

  |

  |

 
for unit testing as part of my work on fixing up testing ATS within Yahoo. I have something different for regression/gold/production/TSQA testing
Jason

      From: Karthik Sivaraman <ka...@outlook.com>
 To: "dev@trafficserver.apache.org" <de...@trafficserver.apache.org> 
 Sent: Friday, April 22, 2016 9:01 AM
 Subject: Unit testing for plugin
   
Hi


We are planning to maintain a plug-in that does third party feed based URL filtering. Are there any recommendations for unit test/regression test frameworks? What does trafficserver use for its unit/regression tests?


Thanks

Karthik

  

Re: Unit testing for plugin

Posted by Karthik Sivaraman <ka...@outlook.com>.
Thanks Gancho. This is very helpful

Karthik

________________________________________
From: Gancho Tenev <gt...@gmail.com>
Sent: Friday, April 22, 2016 4:05 PM
To: dev@trafficserver.apache.org
Subject: Re: Unit testing for plugin

Karthik,

If interested in regression / integration testing (trafficserver+plugin) using TSQA  you could take a look at cachekey plugin regression tests:
  https://github.com/apache/trafficserver/blob/master/plugins/experimental/cachekey/tests/test_cachekey.py

TSQA link:
  https://github.com/apache/trafficserver/tree/master/ci/tsqa

For unit tests Google Test seems like a reasonable choice to me.

Cheers,
—Gancho


> On Apr 22, 2016, at 9:30 AM, Karthik Sivaraman <ka...@outlook.com> wrote:
>
> Thanks all. Will follow up on these links
>
> Karthik
>
> ________________________________________
> From: Brian Geffon <br...@apache.org>
> Sent: Friday, April 22, 2016 8:46 AM
> To: dev@trafficserver.apache.org
> Subject: Re: Unit testing for plugin
>
> Take a look at the open pull requests, there are c++ API mocks that are
> hopefully going to land soon too.
>
> Brian
>
> On Friday, April 22, 2016, James Peach <ja...@me.com> wrote:
>
>>
>>> On Apr 22, 2016, at 7:01 AM, Karthik Sivaraman <
>> karthiksivaraman@outlook.com <javascript:;>> wrote:
>>>
>>> Hi
>>>
>>>
>>> We are planning to maintain a plug-in that does third party feed based
>> URL filtering. Are there any recommendations for unit test/regression test
>> frameworks? What does trafficserver use for its unit/regression tests?
>>
>> Internally, Traffic Server uses a very simple regression test framework,
>> some automake test tools and some integration tests. There’s nothing for
>> external plugins to use for testing, so you should use whatever works for
>> you. The framework that Jason pointed out looks pretty interesting. For C++
>> testing, Google Test and Google Mock are also good choices.
>>
>> J


Re: Unit testing for plugin

Posted by Gancho Tenev <gt...@gmail.com>.
Karthik,

If interested in regression / integration testing (trafficserver+plugin) using TSQA  you could take a look at cachekey plugin regression tests:
  https://github.com/apache/trafficserver/blob/master/plugins/experimental/cachekey/tests/test_cachekey.py 

TSQA link: 
  https://github.com/apache/trafficserver/tree/master/ci/tsqa

For unit tests Google Test seems like a reasonable choice to me.

Cheers,
—Gancho


> On Apr 22, 2016, at 9:30 AM, Karthik Sivaraman <ka...@outlook.com> wrote:
> 
> Thanks all. Will follow up on these links
> 
> Karthik
> 
> ________________________________________
> From: Brian Geffon <br...@apache.org>
> Sent: Friday, April 22, 2016 8:46 AM
> To: dev@trafficserver.apache.org
> Subject: Re: Unit testing for plugin
> 
> Take a look at the open pull requests, there are c++ API mocks that are
> hopefully going to land soon too.
> 
> Brian
> 
> On Friday, April 22, 2016, James Peach <ja...@me.com> wrote:
> 
>> 
>>> On Apr 22, 2016, at 7:01 AM, Karthik Sivaraman <
>> karthiksivaraman@outlook.com <javascript:;>> wrote:
>>> 
>>> Hi
>>> 
>>> 
>>> We are planning to maintain a plug-in that does third party feed based
>> URL filtering. Are there any recommendations for unit test/regression test
>> frameworks? What does trafficserver use for its unit/regression tests?
>> 
>> Internally, Traffic Server uses a very simple regression test framework,
>> some automake test tools and some integration tests. There’s nothing for
>> external plugins to use for testing, so you should use whatever works for
>> you. The framework that Jason pointed out looks pretty interesting. For C++
>> testing, Google Test and Google Mock are also good choices.
>> 
>> J


Re: Unit testing for plugin

Posted by Karthik Sivaraman <ka...@outlook.com>.
Thanks all. Will follow up on these links

Karthik

________________________________________
From: Brian Geffon <br...@apache.org>
Sent: Friday, April 22, 2016 8:46 AM
To: dev@trafficserver.apache.org
Subject: Re: Unit testing for plugin

Take a look at the open pull requests, there are c++ API mocks that are
hopefully going to land soon too.

Brian

On Friday, April 22, 2016, James Peach <ja...@me.com> wrote:

>
> > On Apr 22, 2016, at 7:01 AM, Karthik Sivaraman <
> karthiksivaraman@outlook.com <javascript:;>> wrote:
> >
> > Hi
> >
> >
> > We are planning to maintain a plug-in that does third party feed based
> URL filtering. Are there any recommendations for unit test/regression test
> frameworks? What does trafficserver use for its unit/regression tests?
>
> Internally, Traffic Server uses a very simple regression test framework,
> some automake test tools and some integration tests. There’s nothing for
> external plugins to use for testing, so you should use whatever works for
> you. The framework that Jason pointed out looks pretty interesting. For C++
> testing, Google Test and Google Mock are also good choices.
>
> J

Re: Unit testing for plugin

Posted by Brian Geffon <br...@apache.org>.
Take a look at the open pull requests, there are c++ API mocks that are
hopefully going to land soon too.

Brian

On Friday, April 22, 2016, James Peach <ja...@me.com> wrote:

>
> > On Apr 22, 2016, at 7:01 AM, Karthik Sivaraman <
> karthiksivaraman@outlook.com <javascript:;>> wrote:
> >
> > Hi
> >
> >
> > We are planning to maintain a plug-in that does third party feed based
> URL filtering. Are there any recommendations for unit test/regression test
> frameworks? What does trafficserver use for its unit/regression tests?
>
> Internally, Traffic Server uses a very simple regression test framework,
> some automake test tools and some integration tests. There’s nothing for
> external plugins to use for testing, so you should use whatever works for
> you. The framework that Jason pointed out looks pretty interesting. For C++
> testing, Google Test and Google Mock are also good choices.
>
> J

Re: Unit testing for plugin

Posted by James Peach <ja...@me.com>.
> On Apr 22, 2016, at 7:01 AM, Karthik Sivaraman <ka...@outlook.com> wrote:
> 
> Hi
> 
> 
> We are planning to maintain a plug-in that does third party feed based URL filtering. Are there any recommendations for unit test/regression test frameworks? What does trafficserver use for its unit/regression tests?

Internally, Traffic Server uses a very simple regression test framework, some automake test tools and some integration tests. There’s nothing for external plugins to use for testing, so you should use whatever works for you. The framework that Jason pointed out looks pretty interesting. For C++ testing, Google Test and Google Mock are also good choices.

J