variable threadPoolSize

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

variable threadPoolSize

gerhard-8

Hi,
we like to do some tests on our application server  with different
invocationCount and threadPoolSize parameters to simulate mass data
tests. At the moment we had to deploy our code each time while changing
these parameters (or we had to duplicate our code with different
invocationCount and threadPoolSize parameters).
But it would be much nicer if we could use a variable in the testng
annotation like
@testng.test invocationCount = x1 threadPoolSize = x2
and define the values for these variables in the testng.xml e.g.
<javaDocParameter name="x1"  value="4"/>
What do you think about that idea?
Gerhard


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: variable threadPoolSize

Alexandru Popescu ☀

On 12/12/06, gerhard <[hidden email]> wrote:
>
> Hi,
> we like to do some tests on our application server  with different
> invocationCount and threadPoolSize parameters to simulate mass data
> tests. At the moment we had to deploy our code each time while changing
> these parameters (or we had to duplicate our code with different
> invocationCount and threadPoolSize parameters).

Have you looked to AnnotationTransformer? I really think it is meant
to solve this exact type of problems.

> But it would be much nicer if we could use a variable in the testng
> annotation like
> @testng.test invocationCount = x1 threadPoolSize = x2
> and define the values for these variables in the testng.xml e.g.
> <javaDocParameter name="x1"  value="4"/>
> What do you think about that idea?

It may work for javadoc annotations, but will never work for JDK5
annotations which are strongly typed. Creating/supporting different
behavior for the 2 versions (JDK1.4 and JDK5) is not an option imo.

HTH,

./alex
--
.w( the_mindstorm )p.
  TestNG co-founder
EclipseTestNG Creator

> Gerhard
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: variable threadPoolSize

Cédric Beust ♔


On 12/12/06, Alexandru Popescu <[hidden email]> wrote:

Have you looked to AnnotationTransformer? I really think it is meant
to solve this exact type of problems.

That would be my first suggestion as well.

> But it would be much nicer if we could use a variable in the testng
> annotation like
> @testng.test invocationCount = x1 threadPoolSize = x2
> and define the values for these variables in the testng.xml e.g.
> <javaDocParameter name="x1"  value="4"/>
> What do you think about that idea?

It may work for javadoc annotations, but will never work for JDK5
annotations which are strongly typed. Creating/supporting different
behavior for the 2 versions (JDK1.4 and JDK5) is not an option imo.

True.  I have played with the idea of introducing "var" attributes for that:  for each attribute that we want to make specifiable with testng.xml (e.g. threadPoolSize), introduce a "String varThreadPoolSize" that corresponds to a property.

I still think the idea has some merit, but a bit less so since the introduction of Annotation Transformers.

--
Cédric


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en
-~----------~----~----~----~------~----~------~--~---