<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Is there way to run a single Ambari python unit test using mvn test command? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Is-there-way-to-run-a-single-Ambari-python-unit-test-using/m-p/101017#M13762</link>
    <description>&lt;P&gt;Thanks again!&lt;/P&gt;&lt;P&gt;Here is what worked for me (using python 2.6.6). Still need to investigate how to run the test from ambari root directory.&lt;/P&gt;&lt;PRE&gt;$ pip install discover
$ export PYTHONPATH=~/git/ambari/ambari-common/src/test/python
$ cd ~/git/ambari/ambari-server/src/test/python/stacks/2.3/common
$ python -m discover -v
Test that HAWQSTANDBY is not recommended on a single node cluster ... ok
...
----------------------------------------------------------------------
Ran 21 tests in 0.318s
OK
&lt;/PRE&gt;</description>
    <pubDate>Tue, 05 Jan 2016 04:05:37 GMT</pubDate>
    <dc:creator>ljain</dc:creator>
    <dc:date>2016-01-05T04:05:37Z</dc:date>
    <item>
      <title>Is there way to run a single Ambari python unit test using mvn test command?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Is-there-way-to-run-a-single-Ambari-python-unit-test-using/m-p/101013#M13758</link>
      <description>&lt;P&gt;e.g. mvn -Dtest=TestHDP23StackAdvisor test&lt;/P&gt;</description>
      <pubDate>Wed, 30 Dec 2015 12:30:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Is-there-way-to-run-a-single-Ambari-python-unit-test-using/m-p/101013#M13758</guid>
      <dc:creator>ljain</dc:creator>
      <dc:date>2015-12-30T12:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: Is there way to run a single Ambari python unit test using mvn test command?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Is-there-way-to-run-a-single-Ambari-python-unit-test-using/m-p/101014#M13759</link>
      <description>&lt;P&gt;is there a specific unit test you're referring to? Ambari unit tests are written in Java using JUnit, so you'd use mvn, just like your example. Here's the development guide, &lt;A href="https://cwiki.apache.org/confluence/display/AMBARI/Coding+Guidelines+for+Ambari"&gt;https://cwiki.apache.org/confluence/display/AMBARI...&lt;/A&gt; and here's latest build reports &lt;A href="https://builds.apache.org/job/Ambari-trunk-Commit/."&gt;https://builds.apache.org/job/Ambari-trunk-Commit/...&lt;/A&gt; For general python unit testing and running single tests, you can do so by referring to Python docs:&lt;/P&gt;&lt;P&gt;The unittest module can be used from the command line to run tests from modules, classes or even individual test methods:&lt;/P&gt;&lt;PRE&gt;python -m unittest test_module1 test_module2
python -m unittest test_module.TestClass
python -m unittest test_module.TestClass.test_method&lt;/PRE&gt;</description>
      <pubDate>Thu, 31 Dec 2015 10:19:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Is-there-way-to-run-a-single-Ambari-python-unit-test-using/m-p/101014#M13759</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2015-12-31T10:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: Is there way to run a single Ambari python unit test using mvn test command?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Is-there-way-to-run-a-single-Ambari-python-unit-test-using/m-p/101015#M13760</link>
      <description>&lt;P&gt;Hi Artem,&lt;/P&gt;&lt;P&gt;Thanks a lot for your input. I was looking to test stack advisor recommendations and validations.&lt;/P&gt;&lt;P&gt;e.g. ambari/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jan 2016 06:00:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Is-there-way-to-run-a-single-Ambari-python-unit-test-using/m-p/101015#M13760</guid>
      <dc:creator>ljain</dc:creator>
      <dc:date>2016-01-01T06:00:22Z</dc:date>
    </item>
    <item>
      <title>Re: Is there way to run a single Ambari python unit test using mvn test command?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Is-there-way-to-run-a-single-Ambari-python-unit-test-using/m-p/101016#M13761</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/1847/ljain.html" nodeid="1847"&gt;@Lav Jain&lt;/A&gt; it utilizes unittest so you'd run the tests just as my examples above. &lt;A href="https://github.com/apache/ambari/blob/trunk/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py" target="_blank"&gt;https://github.com/apache/ambari/blob/trunk/ambari-server/src/test/python/stacks/2.3/common/test_stack_advisor.py&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Jan 2016 10:10:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Is-there-way-to-run-a-single-Ambari-python-unit-test-using/m-p/101016#M13761</guid>
      <dc:creator>aervits</dc:creator>
      <dc:date>2016-01-02T10:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: Is there way to run a single Ambari python unit test using mvn test command?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Is-there-way-to-run-a-single-Ambari-python-unit-test-using/m-p/101017#M13762</link>
      <description>&lt;P&gt;Thanks again!&lt;/P&gt;&lt;P&gt;Here is what worked for me (using python 2.6.6). Still need to investigate how to run the test from ambari root directory.&lt;/P&gt;&lt;PRE&gt;$ pip install discover
$ export PYTHONPATH=~/git/ambari/ambari-common/src/test/python
$ cd ~/git/ambari/ambari-server/src/test/python/stacks/2.3/common
$ python -m discover -v
Test that HAWQSTANDBY is not recommended on a single node cluster ... ok
...
----------------------------------------------------------------------
Ran 21 tests in 0.318s
OK
&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Jan 2016 04:05:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Is-there-way-to-run-a-single-Ambari-python-unit-test-using/m-p/101017#M13762</guid>
      <dc:creator>ljain</dc:creator>
      <dc:date>2016-01-05T04:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: Is there way to run a single Ambari python unit test using mvn test command?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Is-there-way-to-run-a-single-Ambari-python-unit-test-using/m-p/101018#M13763</link>
      <description>&lt;P&gt;Hi FYI i have used &lt;/P&gt;&lt;PRE&gt;/git/ambari/ambari-common/src/main/python as oppose to /git/ambari/ambari-common/src/test/python&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Dec 2016 23:59:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Is-there-way-to-run-a-single-Ambari-python-unit-test-using/m-p/101018#M13763</guid>
      <dc:creator>sbouguerra</dc:creator>
      <dc:date>2016-12-22T23:59:41Z</dc:date>
    </item>
  </channel>
</rss>

