diff --git a/common/test.py b/common/test.py
index acfe1ad..584af6d 100644
--- a/common/test.py
+++ b/common/test.py
@@ -175,10 +175,18 @@
                 return net
 
     @staticmethod
-    def _stack_output(stack, output_key):
+    def _stack_output(stack, output_key, validate_errors=True):
         """Return a stack output value for a given key."""
-        return next((o['output_value'] for o in stack.outputs
-                    if o['output_key'] == output_key), None)
+        value = None
+        for o in stack.outputs:
+            if validate_errors and 'output_error' in o:
+                # scan for errors in the stack output.
+                raise ValueError(
+                    'Unexpected output errors in %s : %s' % (
+                        output_key, o['output_error']))
+            if o['output_key'] == output_key:
+                value = o['output_value']
+        return value
 
     def _ping_ip_address(self, ip_address, should_succeed=True):
         cmd = ['ping', '-c1', '-w1', ip_address]
diff --git a/functional/test_resource_group.py b/functional/test_resource_group.py
index ab3b355..8bc9950 100644
--- a/functional/test_resource_group.py
+++ b/functional/test_resource_group.py
@@ -244,14 +244,14 @@
 
         env = {'resource_registry':
                {'My::RandomString': 'OS::Heat::RandomString'}}
-        template_one = self.template.replace("count: 0", "count: 1")
+        template_one = self.template.replace("count: 0", "count: 2")
         stack_identifier = self.stack_create(template=template_one,
                                              environment=env)
         self.assertEqual({u'random_group': u'OS::Heat::ResourceGroup'},
                          self.list_resources(stack_identifier))
 
         initial_nested_ident = self._group_nested_identifier(stack_identifier)
-        self.assertEqual({'0': 'My::RandomString'},
+        self.assertEqual({'0': 'My::RandomString', '1': 'My::RandomString'},
                          self.list_resources(initial_nested_ident))
         # get the output
         stack0 = self.client.stacks.get(stack_identifier)
@@ -301,7 +301,7 @@
         env = {'resource_registry':
                {'My::RandomString': 'my_random.yaml'}}
 
-        template_one = self.template.replace("count: 0", "count: 1")
+        template_one = self.template.replace("count: 0", "count: 2")
         stack_identifier = self.stack_create(template=template_one,
                                              environment=env,
                                              files=files1)
@@ -309,7 +309,7 @@
                          self.list_resources(stack_identifier))
 
         initial_nested_ident = self._group_nested_identifier(stack_identifier)
-        self.assertEqual({'0': 'My::RandomString'},
+        self.assertEqual({'0': 'My::RandomString', '1': 'My::RandomString'},
                          self.list_resources(initial_nested_ident))
         # get the output
         stack0 = self.client.stacks.get(stack_identifier)
diff --git a/functional/test_template_resource.py b/functional/test_template_resource.py
index 0d5734b..00e08b0 100644
--- a/functional/test_template_resource.py
+++ b/functional/test_template_resource.py
@@ -180,6 +180,9 @@
 resources:
   secret1:
     type: OS::Heat::RandomString
+outputs:
+  nested_str:
+    value: {get_attr: [secret1, value]}
 '''
         stack_identifier = self.stack_create(
             template=self.main_templ,
