Thank you both forma tour responses. I will be using regex then.

On Mon, Jul 11, 2022, 15:50 Flavio Cysne <flaviocy...@gmail.com> wrote:

> Hi, _elgato.
>
> AfaIk, there is no Thread Group number/sequence/index in JMeter's functions
> list.
>
> As explained by Dmitri, you could use a naming pattern on the Thread Group
> names and extract the group number using regular expressions.
>
> Kind regards,
> Flavio Gomes
>
> On Mon, Jul 11, 2022 at 8:46 AM _elgato <el.gato.negr...@gmail.com> wrote:
>
> > Hi everyone,
> >
> > I am trying to get the Thread Group number of the thread group
> > executing a request so I can correlate it with a property (or maybe a
> > CSV line), but I am having a hard time getting the number alone.
> >
> > I am able to get the full thread name (including the number) with
> > thread.getThreadName(), but I would need to isolate the number from
> > the name and I would like to skip that part if possible.
> >
> > Methods that I have used:
> > ctx.getThreadGroup().getName() returns Thread Group
> > ctx.getThreadGroup().getThreadName() returns null for some reason
> > ctx.getThreadNum() returns 0 as it is the first thread to run inside
> > the Thread Group
> > ctx.getThread().getThreadName() returns Thread Group 1-1
> > ctx.getThread().getThreadNum() returns 0
> >
> > Where can I find this information?
> >
> > Thank you.
> > Regards.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
> > For additional commands, e-mail: user-h...@jmeter.apache.org
> >
> >
>

Reply via email to