I used updated version NetBeans(NetBeans IDE 7.2.1). I solved this issue.
Error in MTAF While Running Sample Test in Netbeans
-
04-06-2022 - |
Вопрос
We have more issues while running sample test in MTAF.
I have completed all the basic installation setup as per the MTAF documentation.
When i try to run the sample test, below issues are found in Netbeans.
1) Firefox is not running, When in try to run the test in Netbeans 6.9.1.
phpunit.xml
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="true"
backupStaticAttributes="false"
bootstrap="bootstrap.php"
cacheTokens="true"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
forceCoversAnnotation="false"
mapTestClassNameToCoveredClassName="false"
printerClass="PHPUnit_TextUI_ResultPrinter"
processIsolation="false"
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false"
testSuiteLoaderClass="PHPUnit_Runner_StandardTestSuiteLoader"
strict="false"
verbose="true">
<testsuites>
<testsuite name="All Tests">
<directory suffix="Test.php">testsuite/Core/Mage</directory>
</testsuite>
</testsuites>
<logging>
<log type="coverage-html" target="./tmp/report" charset="UTF-8" yui="true" highlight="false"
lowUpperBound="35" highLowerBound="70"/>
<log type="coverage-xml" target="./tmp/coverage.xml"/>
<log type="graphviz" target="./tmp/logfile.dot"/>
<log type="json" target="./tmp/logfile.json"/>
<log type="metrics-xml" target="./tmp/metrics.xml"/>
<log type="plain" target="./tmp/logfile.txt"/>
<log type="pmd-xml" target="./tmp/pmd.xml" cpdMinLines="5" cpdMinMatches="70"/>
<log type="tap" target="./tmp/logfile.tap" logIncompleteSkipped="true"/>
<log type="junit" target="./tmp/logfile.xml" logIncompleteSkipped="false"/>
<log type="testdox-html" target="./tmp/testdox.html"/>
<log type="testdox-text" target="./tmp/testdox.txt"/>
</logging>
</phpunit>
config.yml
browsers:
googlechrome: &googlechrome
name: 'Google Chrome'
browser: '*googlechrome'
host: 'localhost'
port: 4444
timeout: 60
firefox: &firefox
name: 'Firefox'
browser: '*chrome'
host: 'localhost'
port: 4444
timeout: 60
iexplorer: &iexplorer
name: 'Internet Explorer'
browser: '*iexplore'
host: 'localhost'
port: 4444
timeout: 60
default: *firefox
framework:
fixture_base_path: 'fixture'
testsuite_base_path: 'testsuite'
#work only if tests are run for single browser
shareSession: true
coverageScriptUrl: ''
#captureScreenshotOnFailure works only for browsers that support it: Firefox/Chrome, IE with snapsIE tool
captureScreenshotOnFailure: true
saveHtmlPageOnFailure: false
load_all_uimaps: true
load_all_data: true
cache:
frontend:
name: 'core'
options:
caching: false
cache_id_prefix: 'selenium_'
automatic_serialization: true
backend:
name: 'file'
options:
cache_dir: 'var/cache'
applications:
mage: &mage
fallbackOrderFixture: 'default'
fallbackOrderHelper: 'Core'
areas:
admin:
url: 'http://www.localhost.com/magento/index.php/admin/'
base_page_uimap: 'log_in_to_admin'
uimap_path: 'admin'
login: 'admin'
password: 'admin123'
frontend:
url: 'http://www.localhost.com/magento/index.php'
base_page_uimap: 'home_page'
default: *mage
2) Shall i need to add / modify any other codes in my system?
3) When i try to click the test project under the Run, its seems error as like below screen shot.
Folder Structure :
I have used testing folder structure as like GITHUB.
But MTAF document gives the different folder structure like reference document.
I can see the different folder structure in GIT & reference link.
Which is correct folder structure to use in test frame work?
Any help my appreciation.
Решение
Другие советы
The folder structure in the GIT works fine for MTAF. Just add the testcases in the testsuite under the required folder.