Re: [openstack-dev] How to debug test cases in Openstack
Also note this script from the oslotest library: https://github.com/openstack/oslotest/blob/master/tools/oslo_debug_helper It was added specifically to allow debugging with pdb. I've never actually used it though. :-) -Ben On 01/16/2015 10:56 AM, Davanum Srinivas wrote: > Abhishek, > > In addition to the tips above, i put up a post for using py.test and > testtools.run as well here: > https://davanum.wordpress.com/2015/01/13/quickly-running-a-single-openstack-nova-test/ > > -- dims > > On Fri, Jan 16, 2015 at 11:44 AM, Adam Young wrote: >> On 01/16/2015 12:37 AM, Abhishek Talwar/HYD/TCS wrote: >> >> Hi, >> >> I have been trying to debug the test cases in OpenStack, but I am not >> getting successful with it. So if someone can help me with that. The last >> response from the dev-list was to use " $ ./run_tests.sh -d [test module >> path] " but this gives bDb quit error. >> >> >> Depends on the project. The majority of the projects have moved over to >> using tox. In Keystone, tox will run everything, which might be to much; >> >> >> tox -epy27 >> >> is usually what I run for unit tests and >> >> tox -epep8 >> >> explicitly for pep8 testing. >> >> To run a specific file full of tests: >> >> tox -e py27 test_v3_auth >> >> works as does >> >> >> tox -e py27 keysteon.tests.test_v3_auth.TestPKIZTokenAPIs >> >> >> So kindly help me this. >> -- >> Thanks and Regards >> Abhishek Talwar >> >> =-=-= >> Notice: The information contained in this e-mail >> message and/or attachments to it may contain >> confidential or privileged information. If you are >> not the intended recipient, any dissemination, use, >> review, distribution, printing or copying of the >> information contained in this e-mail message >> and/or attachments to it are strictly prohibited. If >> you have received this communication in error, >> please notify us by reply e-mail or telephone and >> immediately and permanently delete the message >> and any attachments. Thank you >> >> >> >> __ >> OpenStack Development Mailing List (not for usage questions) >> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe >> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev >> >> >> >> __ >> OpenStack Development Mailing List (not for usage questions) >> Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe >> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev >> > > > __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] How to debug test cases in Openstack
Abhishek, In addition to the tips above, i put up a post for using py.test and testtools.run as well here: https://davanum.wordpress.com/2015/01/13/quickly-running-a-single-openstack-nova-test/ -- dims On Fri, Jan 16, 2015 at 11:44 AM, Adam Young wrote: > On 01/16/2015 12:37 AM, Abhishek Talwar/HYD/TCS wrote: > > Hi, > > I have been trying to debug the test cases in OpenStack, but I am not > getting successful with it. So if someone can help me with that. The last > response from the dev-list was to use " $ ./run_tests.sh -d [test module > path] " but this gives bDb quit error. > > > Depends on the project. The majority of the projects have moved over to > using tox. In Keystone, tox will run everything, which might be to much; > > > tox -epy27 > > is usually what I run for unit tests and > > tox -epep8 > > explicitly for pep8 testing. > > To run a specific file full of tests: > > tox -e py27 test_v3_auth > > works as does > > > tox -e py27 keysteon.tests.test_v3_auth.TestPKIZTokenAPIs > > > So kindly help me this. > -- > Thanks and Regards > Abhishek Talwar > > =-=-= > Notice: The information contained in this e-mail > message and/or attachments to it may contain > confidential or privileged information. If you are > not the intended recipient, any dissemination, use, > review, distribution, printing or copying of the > information contained in this e-mail message > and/or attachments to it are strictly prohibited. If > you have received this communication in error, > please notify us by reply e-mail or telephone and > immediately and permanently delete the message > and any attachments. Thank you > > > > __ > OpenStack Development Mailing List (not for usage questions) > Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev > > > > __ > OpenStack Development Mailing List (not for usage questions) > Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev > -- Davanum Srinivas :: https://twitter.com/dims __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] How to debug test cases in Openstack
On 01/16/2015 12:37 AM, Abhishek Talwar/HYD/TCS wrote: Hi, I have been trying to debug the test cases in OpenStack, but I am not getting successful with it. So if someone can help me with that. The last response from the dev-list was to use " $ ./run_tests.sh -d [test module path] " but this gives bDb quit error. Depends on the project. The majority of the projects have moved over to using tox. In Keystone, tox will run everything, which might be to much; tox -epy27 is usually what I run for unit tests and tox -epep8 explicitly for pep8 testing. To run a specific file full of tests: tox -e py27 test_v3_auth works as does tox -e py27 keysteon.tests.test_v3_auth.TestPKIZTokenAPIs So kindly help me this. -- Thanks and Regards Abhishek Talwar =-=-= Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] How to debug test cases in Openstack
On Fri, Jan 16, 2015 at 11:07:07AM +0530, Abhishek Talwar/HYD/TCS wrote: > Hi, > > I have been trying to debug the test cases in OpenStack, but I am not getting > successful with it. So if someone can help me with that. The last response > from the dev-list was to use " $ ./run_tests.sh -d [test module path] > " but this gives bDb quit error. There are several ways to execute UT, you can use tox or run_tests.sh or for a more specific test I prefer to enter in the venv and to use nose. s. > So kindly help me this. > -- > Thanks and Regards > Abhishek Talwar > =-=-= > Notice: The information contained in this e-mail > message and/or attachments to it may contain > confidential or privileged information. If you are > not the intended recipient, any dissemination, use, > review, distribution, printing or copying of the > information contained in this e-mail message > and/or attachments to it are strictly prohibited. If > you have received this communication in error, > please notify us by reply e-mail or telephone and > immediately and permanently delete the message > and any attachments. Thank you > > > __ > OpenStack Development Mailing List (not for usage questions) > Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
Re: [openstack-dev] How to debug test cases in Openstack
Hi, You have a pdb statement somewhere in your test case. Follow this to run a single test with pdb. https://wiki.openstack.org/wiki/Testr Cheers, Ajaya Cheers, Ajaya On Fri, Jan 16, 2015 at 11:07 AM, Abhishek Talwar/HYD/TCS < abhishek.tal...@tcs.com> wrote: > Hi, > > I have been trying to debug the test cases in OpenStack, but I am not > getting successful with it. So if someone can help me with that. The last > response from the dev-list was to use " $ ./run_tests.sh -d [test module > path] " but this gives bDb quit error. > > So kindly help me this. > -- > Thanks and Regards > Abhishek Talwar > > =-=-= > Notice: The information contained in this e-mail > message and/or attachments to it may contain > confidential or privileged information. If you are > not the intended recipient, any dissemination, use, > review, distribution, printing or copying of the > information contained in this e-mail message > and/or attachments to it are strictly prohibited. If > you have received this communication in error, > please notify us by reply e-mail or telephone and > immediately and permanently delete the message > and any attachments. Thank you > > > __ > OpenStack Development Mailing List (not for usage questions) > Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev > > __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
[openstack-dev] How to debug test cases in Openstack
Hi, I have been trying to debug the test cases in OpenStack, but I am not getting successful with it. So if someone can help me with that. The last response from the dev-list was to use " $ ./run_tests.sh -d [test module path] " but this gives bDb quit error. So kindly help me this. -- Thanks and Regards Abhishek Talwar =-=-= Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you __ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev