View Issue Details

IDProjectCategoryView StatusLast Update
0002959FreeCADBugpublic2017-10-09 17:20
Reporterian.rees Assigned Towmayer  
PrioritylowSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.17 
Target Version0.17Fixed in Version0.17 
Summary0002959: GUI tests aren't run when tests are started via command line
DescriptionIf the FreeCAD executable (the GUI binary, as opposed to FreeCADCmd) is run with "--run-test 0" from the command line, it doesn't run the tests that require an active GUI.

Either all tests, including the GUI-related ones, should be run or the help should be updated to not say that all tests are run with that option.
Tagstesting
FreeCAD Information

Activities

kkremitzki

2017-03-09 03:02

administrator   ~0008582

Last edited: 2017-03-09 03:03


$ freecad-daily -t TestGui  
                                                                                              
FreeCAD 0.17, Libs: 0.17R10452 (Git)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2017
  #####                 ####  ###   ####
  #                    #      # #   #   #
  #     ##  #### ####  #     #   #  #   #
  ####  # # #  # #  #  #     #####  #   #
  #     #   #### ####  #    #     # #   #
  #     #   #    #     #    #     # #   #  ##  ##  ##
  #     #   #### ####   ### #     # ####   ##  ##  ##

Fasteners workbench Loaded
I am executing some stuff here when FreeCAD starts!
Sheet Metal workbench loaded
Tried to run Gui::Application::initApplication() twice!
Traceback (most recent call last):
  File "<string>", line 39, in <module>
  File "/usr/lib/freecad-daily/Mod/Test/TestApp.py", line 95, in TestText
    s = unittest.defaultTestLoader.loadTestsFromName(s)
  File "/usr/lib/python2.7/unittest/loader.py", line 91, in loadTestsFromName
    module = __import__('.'.join(parts_copy))
  File "/usr/lib/freecad-daily/Mod/Test/TestGui.py", line 192, in <module>
    FreeCADGui.addCommand('Test_Test'        ,TestCmd())
<type 'exceptions.AttributeError'>: 'module' object has no attribute 'addCommand'

kkremitzki

2017-03-09 03:22

administrator   ~0008583

There are a total of 181 tests via the Test Workbench:

BaseTests - 13
UnitTests - 3
Document - 31
UnicodeTests - 2
MeshTestsApp - 12
TestFem - 2
TestSketcherApp - 3
TestPartApp - 4
TestPartDesignApp - 1
TestPartDesignGui - 2
TestPathApp - 48
TestSpreadsheet - 20
TestDraft - 17
TestArch - 15
TestTechDrawApp - 1
Workbench - 3
Menu - 2
Menu_MenuCreateCases - 1
Menu_MenuDeleteCases - 1

TOTAL: 181
but `freecad-daily -t 0` (daily PPA build) only reports 140 tests ran. Things like `freecad-daily -t TestDraft` fail, other GUI-based code fails and is probably excluded on purpose. But it's possible to run this stuff from the command line, just needs the right stub...

Kunda1

2017-10-09 14:42

administrator   ~0010271

Forum thread: https://forum.freecadweb.org/viewtopic.php?f=8&t=24808

wmayer

2017-10-09 17:20

administrator   ~0010273

https://github.com/FreeCAD/FreeCAD/commit/4d9416f1cf159b4e4d045208b4c5e1cb405792ae

Issue History

Date Modified Username Field Change
2017-03-09 02:37 ian.rees New Issue
2017-03-09 03:02 kkremitzki Note Added: 0008582
2017-03-09 03:03 kkremitzki Note Edited: 0008582
2017-03-09 03:22 kkremitzki Note Added: 0008583
2017-03-09 13:02 Kunda1 Tag Attached: testing
2017-07-12 12:44 Kunda1 Tag Attached: #post-to-forum
2017-10-09 14:42 Kunda1 Note Added: 0010271
2017-10-09 14:43 Kunda1 Tag Detached: #post-to-forum
2017-10-09 14:43 Kunda1 Priority normal => high
2017-10-09 14:43 Kunda1 Product Version => 0.17
2017-10-09 14:43 Kunda1 Target Version => 0.17
2017-10-09 17:20 wmayer Assigned To => wmayer
2017-10-09 17:20 wmayer Priority high => low
2017-10-09 17:20 wmayer Status new => closed
2017-10-09 17:20 wmayer Resolution open => fixed
2017-10-09 17:20 wmayer Fixed in Version => 0.17
2017-10-09 17:20 wmayer Note Added: 0010273