some comments inline
On Sep 26, 2:39 pm, Sebastien Lefevre <
seb.lefe...@gmail.com> wrote:
> Hi Shavi, and big thanks for your support !
>
> 2. Actually, I was thinking about moving to git instead of mecurial; in
> any case, it's clear we need a distributed SCM and I'll try to migrate
> during the next coming weeks. In the meanwhile, just ask me if you want
> an SVN account.
> Regarding the hosting, I'll probably use another provider to keep the
> source integrated with the trac wiki, as most of the test adapters
> (probes) and codecs wiki pages are generated dynamically from the source
> code.
I did a SCM comparison for my team last year and went with Mercurial.
1. Windows Support
2. Much much simpler workflow/interface
did it for Mercurial.
Git is faster, but in practical terms Mercurial is pretty close.
Your a pythonista like me anyway. So I thought you might like
Mercurial :-))
anyway, no sweat. whatever works for you.
Wherever you host it, you can always autosync a copy into your current
local machine to do your wiki generation.
>
> 3. I'll have a look, I didn't spend a lot of time on documentation these
> days, focusing on introducing new features - not really a best practice,
> but we need to have several things work first :-)
>
> 4. svn commit #378 introduced a way to define "language APIs" on server
> side (conf/language-apis.conf, restart the server (bin/testerman-admin
> restart server) to take the change into account) that can then be
> referenced by an ATS.
> From QTesterman, just update the "language API" Script property to the
> new API you declared on server side.
> This way, you can use an alternative TTCN3 adapter module instead of the
> default TestermanTTCN3, and it should be easier to try new syntax
> approaches without breaking the current ATSes.
>
> If you want to start experimenting a decorator-oriented syntax as you
> suggest, you may, for instance, copy core/TestermanTTCN3.py as
> core/PythonicTTCN3.py, and add a line in conf/language-apis.conf:
>
> testerman.te.python.module.api.2 = PythonicTTCN3
>
> When creating an ATS from QTesterman, just set the language API to "2",
> and your specialized module will be used.
>
> I'll try to experiment myself later during the week.
Thx, will give it a shot.
>
> Just some hints:
>
> when defining a template like:
> ParisWeekendWeatherRequest=Template(
> location = 'Paris',
> date = '15/06/2006',
> kind = 'actual', )
>
> you'll have a problem when you'll have to match fields whose name
> contains dashes, dots, etc.
>
> Let's imagine you have an XML structure received on the network as:
> <something>value</something>
> <something-else>another value</something-else>
>
> You'll probably want to match it with a template that would look like:
> t = Template(
> something = 'value',
> something-else = 'another value'
> )
>
> but this won't be a valid Python syntax, unfortunately. Adopting a
> convention to turn dashes, dots, etc into a character suitable to define
> a Python identifier would prevent from creating some tests and is not a
> solution.
t=dict({'hello-how' : 'value'})
works.
So, If Template was derived from dict() class, the following should
work for the above case.
t = Template({
'something' : 'value',
'something-else' : 'another value',
})
and the following should work for everything else.
t = Template(
something = 'value',
somethingelse = 'another value'
)
>
> --
>
> Function decorators, especially to declare testcases, sound a very good
> idea. To investigate.
> There is probably something to do with the alt() statement too. I'm not
> happy nor proud with the current "lambda in a list" model, especially
> because it forces to implement a TTCN3/alternative in an external
> function as soon as you need to assign a value to a variable (Testerman
> provide a StateManager object to help that, though), or a conditions,
> loops, etc.
>
> --
>
> Regarding the "control part", TTCN-3 makes it mandatory (if I remember
> well).
> Actually, it is convenient to programmatically select the test cases to
> run in an ATS, depending on several external parameters (TTCN-3 can
> group them, too) or at runtime (useless to run some testcases if one
> particular failed, etc), as well as running the same testcase multiple
> times with different arguments, effectively testing different aspects.
If it were upto me, I would pick the best of the various frameworks
and not just stick to just TTCN-3 only.
TTCN-3 does not always get it right, though it does in a quite a few
areas.
TTCN-3 Control is not my favourite way to orgnize test cases.
The nose and python detect and organize tests without 'Control'
section.
And where they need hints, something like the nose @attr() helps.
Unittest2 also has the suite concept, which is also worth a look.
In general less code is better :-))
>
> For instance:
>
> TC_ERROR_TEST(id_suffix = 'NUMERIC_INPUT').execute(invalidValueToSend =
> "12345", expectedError = "Invalid characters")
> TC_ERROR_TEST(id_suffix = 'TOO_SHORT').execute(invalidValueToSend =
> "abc", expectedErrorCode = "You must enter at least 5 characters")
> TC_ERROR_TEST(id_suffix = 'TOO_LONG').execute(invalidValueToSend =
> "abcdefghjklm", expectedErrorCode = "You must enter at most 10 characters")
>
> this will generate 3 different test case IDs in execution reports,
> thanks to the "id_suffix" arg:
> TC_ERROR_TEST_NUMERIC_INPUT
> TC_ERROR_TEST_TOO_SHORT
> TC_ERROR_TEST_TOO_LONG
Nose and py.tests do generative and parametric test case very well.
You might want to take a look at that.
http://somethingaboutorange.com/mrl/projects/nose/0.11.2/writing_tests.html#test-generators
http://tetamap.wordpress.com/2009/05/13/parametrizing-python-tests-generalized/
http://www.voidspace.org.uk/python/weblog/arch_d7_2009_06_13.shtml
unittest2 is something worth a look too.
http://www.voidspace.org.uk/python/articles/unittest2.shtml
Thx,
Sarvi
>
> thanks,
> -seb
>
> Le 26/09/2010 19:29, Saravanan Shanmugham a �crit :
>
>
>
> > Some next steps that might be needed to gather momentum for Testerman
> > 1. It would be good to have a mailing group started at
> >
groups.google.com <
http://groups.google.com>
> > <
http://code.google.com>[Use the mercurial SCM instead of SVN]. Would