Ask Your Question
1

How to debug tests?

asked 2014-01-16 04:46:21 -0500

Hi all,

I'm developing some tests and I want to know how to debug the function of the tests, I mean, functions on tests/test_*.py files. I've try using PDB but it doesn't work.

How can I show the value of the variables and tipical debug things on function tests?

Thank you.

Regards.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-01-16 08:26:15 -0500

darragh-oreilly gravatar image

Have a look at this wiki. When using tox, the logs go to filename .testrepository/$TEST_RUN_NUMBER. With Neutron at least, if env variable OS_DEBUG=1, then the LOG.debug() statements in the SUT will be captured there too.

edit flag offensive delete link more

Comments

Is this the unique way?

Marcos F. Lobo gravatar imageMarcos F. Lobo ( 2014-01-17 03:42:22 -0500 )edit

"the unique way"? - what do you mean? Unique to Neutron?

darragh-oreilly gravatar imagedarragh-oreilly ( 2014-01-17 09:52:36 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-01-16 04:46:21 -0500

Seen: 68 times

Last updated: Jan 16 '14