From 8b79bb395c3012c887f54faefae4abb0aa0f8cb8 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Thu, 10 Oct 2013 17:11:05 -0400 Subject: [PATCH] Add section for negative tests to HACKING.rst This commit adds a new section to HACKING.rst to outline the guidelines for adding negative tests to tempest. Change-Id: Ieb3fc3670bb9229c6791e5c8c0a7ac4fbde03c4d --- HACKING.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/HACKING.rst b/HACKING.rst index 7871f604ae..7d995c330c 100644 --- a/HACKING.rst +++ b/HACKING.rst @@ -105,6 +105,19 @@ name. For example, any test that make an api call to a service other than nova in tempest.api.compute would require a service tag for those services, however they do not need to be tagged as compute. +Negative Tests +-------------- +When adding negative tests to tempest there are 2 requirements. First the tests +must be marked with a negative attribute. For example:: + + @attr(type=negative) + def test_resource_no_uuid(self): + ... + +The second requirement is that all negative tests must be added to a negative +test file. If such a file doesn't exist for the particular resource being +tested a new test file should be added. + Test skips because of Known Bugs --------------------------------