Hi Floris,
Thanks for the reply, hope you are doing good.

So basically in our setup we had a requirement in which we have to use unique 
python scripts for each and every test cases ,insted of having them in a single 
script.
And we had another requirement to change the executing order for different 
scenarios.
For example lets say I have a folder names "TESTS" and
 I have placed 3 test cases named

"test_109.py",
"test_298.py",
"test_301.py",

Now in one suite I want the execution order to be     test301 - test298 – 
test109
And for another it has to be test298 - test301 - test109

Now instead of editing these test cases each and every time for changing the 
order sequence ,

I came up with an approach of storing these cases in a JSON called let say 
“test_suite.JSON”  which contains the following data

{
            Scenario1 : {
“test_301” : 1,
                                    “test_298” : 2,
                                    “test_109” : 3,
                        },

Scenario2 : {
“test_298” : 1,
                                    “test_301” : 2,
                                    “test_109” : 3,
                        }
}


So the command would be “ pytest  ./TESTS --suite_cfg ./test_suite.json 
--suite_name Scenario1 ”

Where ,
suite_cfg and suite_name are the parser key word’s which I used in this plugin.

This plugin will be useful in scenario’s were the testcase name can’t be 
created in an order.

Note: we are using board farm so there will be some additional parameters to 
the above mentioned execution command which will contain the required config 
files.

So I hope now I have explained the need of this plugin and it would be really 
helpful if you could guide me in making this plugin available to the community. 
And thanks for letting me know about this mail thread.

Thanks and Regards,

Siva ram SV.



From: Floris Bruynooghe <floris.bruynoo...@gmail.com> on behalf of Floris 
Bruynooghe <f...@devork.be>
Sent: Monday, September 14, 2020 12:35:26 AM
To: sivaram shibu <sivaramsh...@live.com>; pytest-dev@python.org 
<pytest-dev@python.org>
Subject: Re: [pytest-dev] Plugin for test suite execution

Hi Sivaram,

Hope you are well and nice that you wrote a pytest plugin!  As far as I
recall pytest by default already executes tests in the order they are
defined in the source code though.  I guess this was not expressive
enough for your needs?

As for advertising, it's best to follow the advice on
https://docs.pytest.org/en/stable/writing_plugins.html which mentions
how to use PyPI classifiers.  Also read about the plugin compat project
linked from there, making sure that finds your plugin is a good
indication of how discoverable your plugin is.

Finally, just be aware this is a mailing list of anyone interested in
pytest development and not specifically an admin person.  I'm just one
random person answering.

Cheers,
Floris

On Sat 12 Sep 2020 at 11:08 +0000, sivaram shibu wrote:

> Dear Admin,
>
>                 I was working in a project which uses Pytest framework for 
> testing purpose and we were blocked when we encountered a situation were the 
> test cases has to be executed in a user defined manner , so after doing 
> proper research I have developed a plugin which have satisfied our need , so 
> I thought of making this plugin a global one so other developers might use 
> this feature in their work based on the requirement. Please find the code in 
> the following repository and help me making this plugin a common one among 
> the Pytest community , I was all open for any suggestions.
>
> https://github.com/SivaRamSV/Pytest_Test_suite_sequence
>
> Thanks and Regards,
> Sivaram SV.
>
> _______________________________________________
> pytest-dev mailing list
> pytest-dev@python.org
> https://mail.python.org/mailman/listinfo/pytest-dev
_______________________________________________
pytest-dev mailing list
pytest-dev@python.org
https://mail.python.org/mailman/listinfo/pytest-dev

Reply via email to