Added by Jonas Kilian, last edited by Jonas Kilian on Aug 27, 2008  (view change)

Labels

 
(None)

Frequently Asked Questions

Q: I can see an error in the console or the Molybdenum log file while using Molybdenum. Should I file a bug against Molybdenum?

A: Not all errors ocurring during the usage of Molybdenum are having Molybdenum itself as the root cause. Molybdenum is running in parallel with Firefox and several plugins possibly installed. Additionally, the website under test can issue errors.
Most likely, errors containing something like chrome://molybdenum/... are issued by Molybdenum itself.
If you can see this in the error message, please file a bug.


Q: Can Molybdenum help me in setting up an isolated test environment?

A: Isolating your application under test is very important for test automation. The bigger your application, the more likely you'll be in need for proper configuration management. Just focusing on the client (browser) part of it, won't be enough.
However, for gaining and overview over the requests sent from your browser, we recommend using Tamper Data. You can restrict certain domains, or redirect and log different URLs easily by using FoxyProxy


Q: How do I maintain molybdenum scripts for multiple releases?

A: Put em in your sourcecode respository and use branching, tagging, merging just as you would do with your source code. After all, molybdenum scripts are just XML documents.


Q: How do I customize the test reports for my needs

A: Put a post-builder in your test execution workflow, rendering the XML report using XSLT to whatever output format you like.


Q: Is it possible to create JIRA issues from broken testcases?

A: Create a custom HTML report from your molybdenum XML output and put a link to JIRA for each broken testcase, see JIRA: Creating Issues via direct HTML links, here's a simple example.
Your XSLT 2.0 stylesheet could look similar to this, note the encode-for-uri() function:

<xsl:stylesheet version="2.0"...>

  <xsl:param name="script_base_url"/>
  <xsl:param name="jira-base-url"/>
  <xsl:param name="jira-params"/>

<xsl:template match="selenium-testsuite/test">
...
    <xsl:copy-of select="fn:jira-link(.)"/>
...
</xsl:template>

<xsl:function name="fn:jira-link">
  <xsl:param name="test" as="element()"/>
  	
  <xsl:choose>
      <xsl:when test="$jira-base-url=''">
        <xsl:text>JIRA Url missing</xsl:text>
      </xsl:when>
      <xsl:when test="$test/@state='failed'">
        <a href="{         concat(
          			$jira-base-url,
          			'/secure/CreateIssueDetails!init.jspa?',
          			$jira-params,
          			'&amp;summary=', encode-for-uri($test/@name),
          			'&amp;description=', 
          			encode-for-uri('One-Klick-Moly-Link: '), 
          			$script_base_url, $test/@importedFrom, 
          			'?molybdenum.molybdenum=true')    }">
           <IMG src="images/jira.png" alt="Create JIRA issue..." border="0"/>
        </a>
       </xsl:when>
       <xsl:otherwise>
           <IMG src="images/jira-disabled.png" alt="Create JIRA issue..." border="0"/>
       </xsl:otherwise>

   </xsl:choose>          

</xsl:function>

Eventually, linking JIRA will become a molybdenum feature in near future.


Q: My commands fail with Selenium error message "element has no properties"!

A: This is most likely caused by an incomplete page load, i.e. the DOM is still being modified while molybdenum accesses it. You should find out what is causing the page load: For non AJAX requests, the page load initiating command, mostly a click, should be extended with ...AndWait (e.g. clickAndWait). For AJAX requests, appropriate waitFor... commands have to be used for synchronizing the page load (e.g. waitForTextPresent). Note: waitFor commands cannot be used to synchronize normal page loads, they're just testing the presence of one of the elements in the DOM, use ...AndWait instead.