Open qspin opened 10 years ago
A point stills need some investigation: a function definition has to be at least at the 4th python script line.
Need validation before close
During validation on Windows 8: I encountered 2 problems: 1/ the generateTestScriptDoc.sh need to be called manually ... or the imported doc is not generated ... Would it be possible to call the generateTestScriptDoc.sh automatically when you force to generate the documentation from the qtaste gui?
2/ It seems to complain about Xalan (not found) .... for the HTML generation (even if the needed xml is indeed generated) D:\qtaste\qtaste>bin\generate-TestScript-doc.bat TestSuites\TestSuite_QTaste\Eng ineSuite\QTASTE_IMPORT\QTASTE_IMPORT_01\TestScript.py Test script: D:\qtaste\qtaste\TestSuites\TestSuite_QTaste\EngineSuite\QTASTE_IMP ORT\QTASTE_IMPORT_01\TestScript.py
Generating Test steps module XML doc... No test steps doc to generate
Generating Test script XML doc... D:\qtaste\qtaste\TestSuites\TestSuite_QTaste\EngineSuite\QTASTE_IMPORT\QTASTE_IM PORT_01\TestScript-doc.xml ok
Converting Test script XML doc to HTML... Erreur : impossible de trouver ou charger la classe principale org.apache.xalan. xslt.Process
If you automatically generate the imported module doc in qtaste gui, be sure to find a way to do it efficiently, maybe asynchronously, to avoid slowing down user experience. (I think it was the reason to not include it there)
2014-03-12 11:25 GMT+01:00 Laurent Vanboquestal notifications@github.com:
During validation on Windows 8: I encountered 2 problems: 1/ the generateTestScriptDoc.sh need to be called manually ... or the imported doc is not generated ... Would it be possible to call the generateTestScriptDoc.sh automatically when you force to generate the documentation from the qtaste gui?
2/ It seems to complain about Xalan (not found) .... for the HTML generation (even if the needed xml is indeed generated) D:\qtaste\qtaste>bin\generate-TestScript-doc.bat TestSuites\TestSuite_QTaste\Eng ineSuite\QTASTE_IMPORT\QTASTE_IMPORT_01\TestScript.py Test script: D:\qtaste\qtaste\TestSuites\TestSuite_QTaste\EngineSuite\QTASTE_IMP ORT\QTASTE_IMPORT_01\TestScript.py
Generating Test steps module XML doc... No test steps doc to generate
Generating Test script XML doc...
D:\qtaste\qtaste\TestSuites\TestSuite_QTaste\EngineSuite\QTASTE_IMPORT\QTASTE_IM PORT_01\TestScript-doc.xml ok
Converting Test script XML doc to HTML... Erreur : impossible de trouver ou charger la classe principale org.apache.xalan. xslt.Process
Reply to this email directly or view it on GitHubhttps://github.com/qspin/qtaste/issues/92#issuecomment-37393573 .
Severity: major Priority: medium (on the 25/03/2014 = more than one year ago...) -> Is it now high ? The bug #173 has been raised 3 months ago but closed as duplicate. In the mean time, the the parent bug seems to be quite dead... When is supposed to be released the version 2.3.0 ?
Works on ubuntu 14.04 (64bits) and Win7 32Bits
Doesn't work for me, Ubuntu 15.04 64-bit:
~/qtaste-src$ bin/generate-TestSuites-doc.sh
...
/home/dergo/qtaste-src/TestSuites/TestSuite_QTaste/EngineSuite/QTASTE_REPORT/QTASTE_REPORT_04/TestScript-doc.xml ok
Traceback (innermost last):
File "<string>", line 1, in ?
File "/home/dergo/qtaste-src/tools/jython/lib/Lib/pythondoc.py", line 1376, in ?
File "/home/dergo/qtaste-src/tools/jython/lib/Lib/pythondoc.py", line 982, in parse
File "/home/dergo/qtaste-src/tools/jython/lib/Lib/pythondoc.py", line 640, in parse
File "/home/dergo/qtaste-src/tools/jython/lib/Lib/pythondoc.py", line 528, in parsecomment
File "/home/dergo/qtaste-src/tools/jython/lib/Lib/pythondoc.py", line 255, in parsehtml
UnicodeError: utf-8 decoding error: unexpected code byte
...
(Location of error unknown)/home/dergo/qtaste-src/TestSuites/TestSuite_QTaste/TestSuite-doc.xml (No such file or directory)
(Location of error unknown)org.apache.xml.utils.WrappedRuntimeException: /home/dergo/qtaste-src/TestSuites/TestSuite_QTaste/TestSuite-doc.xml (No such file or directory)
(Location of error unknown)XSLT Error (javax.xml.transform.TransformerException): javax.xml.transform.TransformerException: org.apache.xml.utils.WrappedRuntimeException: /home/dergo/qtaste-src/TestSuites/TestSuite_QTaste/TestSuite-doc.xml (No such file or directory)
Exception in thread "main" java.lang.RuntimeException: javax.xml.transform.TransformerException: org.apache.xml.utils.WrappedRuntimeException: /home/dergo/qtaste-src/TestSuites/TestSuite_QTaste/TestSuite-doc.xml (No such file or directory)
at org.apache.xalan.xslt.Process.doExit(Process.java:1155)
at org.apache.xalan.xslt.Process.main(Process.java:1128)
at com.qspin.qtaste.util.GenerateTestSuiteDoc.generate(GenerateTestSuiteDoc.java:121)
at com.qspin.qtaste.util.GenerateTestSuitesDoc.generate(GenerateTestSuitesDoc.java:46)
at com.qspin.qtaste.util.GenerateTestSuitesDoc.main(GenerateTestSuitesDoc.java:59)
And this point still doesn't work: (lvboque commented on Mar 12, 2014) 1/ the generateTestScriptDoc.sh need to be called manually ... or the imported doc is not generated ... Would it be possible to call the generateTestScriptDoc.sh automatically when you force to generate the documentation from the qtaste gui?
A test script had wrong characters (for utf-8)... I fixed it in commit 24fca54
to test imported script documentation automatic generation, you can use the CheckComponentAccessibility test from the Playback script (in demo)
What you mention is automatic generation of imported test script documentation, which is not the same as automatic generation of pythonlib module documentation.
Automatic generation of pythonlib module documentation is still not supported in GUI, you can try by cleaning all your html doc and the pythonlib/lib-steps-doc.xml file, then go to QTASTE_IMPORT_01 test.
If you implement this, please take https://github.com/qspin/qtaste/issues/92#issuecomment-37517640 into account.
I had a "service" feature in QTaste. The feature itself is very big just for the documentation generation but I though the concept can possibly be reuse for other stuff.... I also create a specific service for the pythonlib documentation generation...
Doesn't seem to work properly for me:
Generating Test steps module XML doc... Generate test script documentation. Error executing PythonInterpreter null XML test script doc has not been generated for /home/dergo/qtaste-src/TestSuites/TestSuite_QTaste/EngineSuite/pythonlib/lib.py
and doc of Step1FromLIB was undefined.
Later when I did go back to QTASTE_IMPORT_01 documentation it was ok.
2015-11-05 14:18 GMT+01:00 simjan notifications@github.com:
I had a "service" feature in QTaste. The feature itself is very big just for the documentation generation but I though the concept can possibly be reuse for other stuff.... I also create a specific service for the pythonlib documentation generation...
— Reply to this email directly or view it on GitHub https://github.com/qspin/qtaste/issues/92#issuecomment-154057135.
Also it seems to execute in loop:
Generating Test steps module XML doc... Generate test script documentation. Error executing PythonInterpreter null XML test script doc has not been generated for /home/dergo/qtaste-src/TestSuites/TestSuite_QTaste/EngineSuite/pythonlib/lib.py Generating Test steps module XML doc... Generate test script documentation. Error executing PythonInterpreter null XML test script doc has not been generated for /home/dergo/qtaste-src/TestSuites/TestSuite_QTaste/EngineSuite/pythonlib/lib.py Generating Test steps module XML doc... Generate test script documentation. Error executing PythonInterpreter null XML test script doc has not been generated for /home/dergo/qtaste-src/TestSuites/TestSuite_QTaste/EngineSuite/pythonlib/lib.py Generating Test steps module XML doc... Generate test script documentation. Error executing PythonInterpreter null XML test script doc has not been generated for /home/dergo/qtaste-src/TestSuites/TestSuite_QTaste/EngineSuite/pythonlib/lib.py Generating Test steps module XML doc... Generate test script documentation. Error executing PythonInterpreter null XML test script doc has not been generated for /home/dergo/qtaste-src/TestSuites/TestSuite_QTaste/EngineSuite/pythonlib/lib.py ...
2015-11-09 16:14 GMT+01:00 David Ergo david.ergo@gmail.com:
Doesn't seem to work properly for me:
- clean up doc
- go to QTASTE_IMPORT_01 in GUI
Generating Test steps module XML doc... Generate test script documentation. Error executing PythonInterpreter null XML test script doc has not been generated for /home/dergo/qtaste-src/TestSuites/TestSuite_QTaste/EngineSuite/pythonlib/lib.py
and doc of Step1FromLIB was undefined.
Later when I did go back to QTASTE_IMPORT_01 documentation it was ok.
2015-11-05 14:18 GMT+01:00 simjan notifications@github.com:
I had a "service" feature in QTaste. The feature itself is very big just for the documentation generation but I though the concept can possibly be reuse for other stuff.... I also create a specific service for the pythonlib documentation generation...
— Reply to this email directly or view it on GitHub https://github.com/qspin/qtaste/issues/92#issuecomment-154057135.
I don't have any problem with this script... Are you on Windows? It's "normal" that there is a loop.... The "service" tries to "successfully" generate the documentation every 10sec... if the documentation file is not present, or outdated, it relaunches the generation...
Linux (Ubuntu 64-bit)
Maybe it's possible to add more information about the error than this ? "Error executing PythonInterpreter null"
Also if it succeeds, I don't think it should print anything at all.
2015-11-09 16:49 GMT+01:00 simjan notifications@github.com:
I don't have any problem with this script... Are you on Windows? It's "normal" that there is a loop.... The "service" tries to "successfully" generate the documentation every 10sec... if the documentation file is not present, or outdated, it relaunches the generation...
— Reply to this email directly or view it on GitHub https://github.com/qspin/qtaste/issues/92#issuecomment-155101746.
It seems the problem come from the testscriptdoc_xmlformatter import in pythondoc...
#v = "testscriptdoc_xmlformatter"
m = __import__(v)
I try to understand the problem...
I fixed the error message.
Simply calling the generate test script doc script on the python lib module produce the error:
~/qtaste-src$ bin/generate-TestScript-doc.sh
TestSuites/TestSuite_QTaste/EngineSuite/pythonlib/lib.py
Generating Test steps module XML doc...
Generate test script documentation.
Error executing PythonInterpreter: AttributeError: 'instance' object has no
attribute 'comment'
XML test script doc has not been generated for
TestSuites/TestSuite_QTaste/EngineSuite/pythonlib/lib.py
It seems it's because there is no global pythondoc in the lib.py file, yet we don't need it. It's a bug in pythondoc when verbose mode is used. If I remove '-V' from GenerateTestScriptDoc.java, then there is no error, yet the script says doc is not generated:
~/qtaste-src$ bin/generate-TestScript-doc.sh
TestSuites/TestSuite_QTaste/EngineSuite/pythonlib/lib.py
Generating Test steps module XML doc...
Generate test script documentation.
XML test script doc has not been generated for
TestSuites/TestSuite_QTaste/EngineSuite/pythonlib/lib.py
But actually you call the wrong script, you should call GenerateTestStepsModulesDoc not GenerateTestScriptDoc!
Also synchronization is missing between the generate doc service and the doc generation in the GUI. The doc generation in the GUI can be run before service has generated doc (generating doc with undefined steps) or can even be run while service is generating doc (generating undefined results).
2015-11-09 16:53 GMT+01:00 David Ergo david.ergo@gmail.com:
Linux (Ubuntu 64-bit)
Maybe it's possible to add more information about the error than this ? "Error executing PythonInterpreter null"
Also if it succeeds, I don't think it should print anything at all.
2015-11-09 16:49 GMT+01:00 simjan notifications@github.com:
I don't have any problem with this script... Are you on Windows? It's "normal" that there is a loop.... The "service" tries to "successfully" generate the documentation every 10sec... if the documentation file is not present, or outdated, it relaunches the generation...
— Reply to this email directly or view it on GitHub https://github.com/qspin/qtaste/issues/92#issuecomment-155101746.
We should generate the pythonlib documentation only when we click on generate documentation menu .... (this can be done asynchronously off course) but only on user request.
-> We believe this is enough for the user ... and we ensure there is no other interaction possible with other part of the qtaste engine (so, no new service feature).
If we generate the documentation from scripts, the pythonlib documentation is generated anyway...
I think it should also generate it when the doc is automatically generated when going to the documentation tab of a test.
to validate
It still doesn't work if the step is defined in a module imported in a module imported by the test script.
e.g. myStep is defined in commonModule, commonModule is imported in myModule, test script imports myModule and tries to use myStep => doc generator doesn't find the definition of myStep
Documentation (@step, @expected python docstrings) available in 'pythonlib' directory are not imported correctly in TestScripts.