Hello Thomas,
Right now this discussion is not about unit tests (parallel running).
This discussion is about Integration tests, runner for Horizon integration tests and using Pytest in general. - Specifically for Watcher.

As for pytest vs stestr, again, Horizon never used stestr as a test runner and I am still waiting if someone - who is here longer than me and maybe was the part of the historical decisions - why nosetests, why Django built-in test runner, why Pytest and NEVER stestr. If I do not get an answer here I will try to directly ping longer active members of Horizon or will dig into some old meeting notes, etc. But now I am still hearing from you why we should use stestr and why it is required but I do not hear why Horizon NEVER used it for integration tests. So I am not arguing we should not use it, but I am really curious why it is so important as you are saying and why it was never used for Horizon Integration tests.

I understand that there are gaps in Horizon and now this thread appeared and you are using it to share all things that you are not satisfied with and although I am trying to answer them all, we should stick here with the original topic and you can come to discuss the others (unit tests parallel running, oslo.config, etc.) on our weekly meetings or PTG.

But to very briefly answer your question: Oslo.config was discussed on previous (Flamingo) PTG as something that would be nice to have: https://etherpad.opendev.org/p/horizon-flamingo-ptg#L85 but as there are still higher priority topics, the current state is that the team is not working on it but also we did not give-up. We know about it, we would like to complete this topic but it is waiting for its time.

Thank you
Jan


On Sat, Nov 8, 2025 at 3:36 PM Thomas Goirand <zigo@debian.org> wrote:
On 11/7/25 1:55 PM, Jan Jasek wrote:
> I saw you mentioned parallel running multiple times.

Yes, because it's very annoying that it takes forever, when it could
take 32 times less time to build the Horizon package on my 16 cores
laptop (my boss bought it to me so I spend less time waiting for builds...).

> Pytest-xdist, I was experimenting very very little with it some time
> ago. It worked fine for “ui-pytests” (where tests are completely
> independent and running in django live server). I did not have time to
> experiment much with “integration-pytests” but I am afraid that as the
> tests there include pagination tests for instance, image, volume,
> snapshot and all the tests require “resources” in general (like volume
> resource for all volume snapshot tests, etc.).

I do not run integration tests when building packages. IMO, integration
tests should be living in tempest, not in a per-project thing, otherwise
it's difficult for me to run them.

What I would like to run in parallel is unit tests, which in the past in
Horizon, wouldn't run in parallel.

As for pytest vs stestr, again, the best thing would be if you could use
stestr as test runners, because it has a nice interface (for selecting
tests with a regex), even if you're using pytest extensions. That's
asking a lot less than just removing all traces of pytest.

Though I wont complain too much about this, it's more a strong
suggestion than a hard requirement.

> being able to run the tests in parallel was not super high
> priority on my plate - it was to make tests somehow stable and
> maintainable

Thanks for that already! :)

> And I am quite sure that parallel running did not exist in previous
> integration tests (as they were barely stable).

As I wrote, even unit tests couldn't run in parallel...

Switching subject now...

One other thing which I think would be awesome, would be getting rid of
local_settings.py and get an openstack_dashboard.conf instead, using
oslo.config. This has been discussed for like 10 years, but was never
achieved. The local_settings.py of Horizon is just horrible to deal with
when using config management. In puppet and in Kolla, there's no other
choice but using Jinja2 templates, which is barely readable when you add
conditionals.

Is this still something the team is working on? Or has this been just
given-up ?

Cheers,

Thomas Goirand (zigo)

P.S: Do you CC me please, I'm registered to the list, and that's
breaking my mail filtering.