KevinGG commented on a change in pull request #11338: [BEAM-7923] Screendiff 
Integration Tests
URL: https://github.com/apache/beam/pull/11338#discussion_r405744990
 
 

 ##########
 File path: 
sdks/python/apache_beam/runners/interactive/testing/integration/tests/init_square_cube_test.py
 ##########
 @@ -0,0 +1,37 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+"""Integration tests for interactive beam."""
+# pytype: skip-file
+
+from __future__ import absolute_import
+
+import unittest
+
+from apache_beam.runners.interactive.testing.integration.screen_diff import 
BaseTestCase
+
+
[email protected](
+    BaseTestCase.should_skip(),
+    '[interactive] and [interactive_test] dependency are both required.')
+class InitSquareCubeTest(BaseTestCase):
+  def test_init_square_cube_notebook(self):
+    self.assert_notebook('init_square_cube')
 
 Review comment:
   As explained in the 
   
   > Could we compare produced html outputs? Do we need to compare that pixels 
are equivalent, if instead we can compare the html outputs?
   
   The advantages/benefits is that:
   
   -  This is real integration test that executes/renders the notebook outputs;
   -  This can find errors and problems that regex/plain-text comparison could 
not catch;
   -  This rules out false test failures (flakiness) in regex/plain-text 
comparison tests.
   -  The test result is screenshot that is highly readable.
   -  You don't even need to write any test. Just give the infrastructure a 
notebook and you are done.
   
   It does have its own disadvantage/flakiness:
   
   - Anything that causes unstable rendering will potentially fail the test.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to