Access Keys:
Skip to content (Access Key - 0)
Log in (Access Key - 5)



Toggle Sidebar

FAQ

Frequently Asked Questions


How to stop Firefox from crashing during testrun?

A:

  1. Use the latest stable version of firefox
  2. Re-create your firefox profile for every test run (the ANT and Maven tasks in the automation package will do this conveniently for you)
  3. Be sure no 3rd party extensions besides molybdenum are running in your firefox test automation profile
  4. Examine the crash report written by firefox. Any hints?
  5. Turn on firefox logging and examine the output via system propery, see http://www.mozilla.org/projects/nspr/reference/html/prlog.html
    1. is the crash caused by the very same test case every time?
    2. what is the last HTTP request being made before the crash?
    3. Is there any non-html content involved?
    4. Was a helper application being called from molybdenum?
  6. Uninstall Flash plugin by deleting the files flashplayer.xpt and libflashplayer.sh in your .mozilla/plugins directory.
    Quoting (http://kb.mozillazine.org/Flash):
    The Adobe's implementation of the browser plugin is notorious for crashing Firefox. Fortunately there are alternatives, notably gnash (GPL license) and swfdec (LGPL license).
  7. provide your examination results to the Molybdenum user list and ask for help

There's an error in the firefox error console or the Molybdenum log file while using Molybdenum. Should I file a bug against Molybdenum?

A: Not all errors occurring 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.


How do I maintain molybdenum scripts for multiple releases?

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


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.


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(
                                        concat('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. In order to get some links in the testreport, you can also add them as test description or command message, see Features 0.7.3


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.


Firefox keeps asking for Basic HTTP Authentication passwords and brings up untrusted certificate dialogs and as such tests will not running automatically. How to avoid this?

A: For security reasons, Molybdenum won't interact with Firefox Authentication dialogs. But Firefox itself has the ability to store passwords and certificate exceptions once you've entered them.

Passwords will be stored in your firefox profile in the files

  • signons.txt resp. signons2.txt resp. signons3.txt depending on your firefox version
  • and key3.db.

Certificates will be stored in a file called

  • cert8.db.

Certificate exceptions (for self-signed certificates) are stored in

  • cert_override.txt

If you save those files and copy them to your profile, they won't be asked again during testrun.

Further explanations will follow here...


Firefox seems to "remember" basic authentication password as the dialogs are prefilled. Nevertheless, the credentials have to be explicitly confirmed by manually choosing "Ok" during testrun?!

A:

  • Firefox brings up a "yes/no" dialog whenever username and password credentials are part of the URL like this
    (http://user:password@host/)

    This dialog is a Firefox security feature. Do not invoke your application under test like that.

  • Even when the user and password are not part of the URL, Firefox might bring up a different dialog asking you to confirm the username and password already prefilled from a previous try. This behaviour is gone with Firefox 3.1, we have no official bug at hand (if you have it, please post to the developer mailing list). If you use an older Firefox version, turn of the basic auth in your AUT or use some 3rd party firefox extension doing the confirmations for you.

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


How to control the test execution flow using conditional statements like "if"?

A: See No flow control?


How do I prevent Firefox 3.x from crashing in an automatic execution because of libsqlite on MacOS?

A: If you get an error-message like "Dyld Error Message: Library not loaded: /usr/lib/libsqlite3.dylib Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security Reason: Incompatible library version: Security requires version 9.0.0 or later, but libsqlite3.dylib provides version 1.0.0" rename or remove the libsqlite3.dylib in ./Firefox.app/Contents/MacOS/. This stops the Firefox from crashing, but may have other unknown side-effects.

last edited on Mar 15, 2010 22:38
Adaptavist Theme Builder Powered by Atlassian Confluence