Difference between revisions of "Testing"

From FreeCAD Documentation
Jump to: navigation, search
m (Improved the stye of the page layout)
(Marked this version for translation)
(22 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
<languages/>
 +
<translate>
 +
<!--T:20-->
 +
{{docnav
 +
|[[Debugging|Debugging]]
 +
|[[Continuous Integration|Continuous Integration]]
 +
}}
 +
 +
</translate>
 +
[[Image:Workbench_Test.svg|64px]]
 
<translate>
 
<translate>
 +
 +
== Introduction == <!--T:2-->
 +
 +
</translate>
 +
{{TOCright}}
 +
<translate>
 +
 
<!--T:1-->
 
<!--T:1-->
FreeCAD comes with an extensive testing framework. The testing bases on a set of Python scripts which are located in the test module.
+
The [[Test Framework Workbench|Test Framework Workbench]] is not really a modelling workbench, but it contains a set of [[Python|Python]] scripts to perform different tests on the core components of FreeCAD, in order to debug problems. See also [[debugging|debugging]].
  
== Introduction ==<!--T:2-->
+
<!--T:25-->
This is the list of test apps as of 0.15 Git 4207:
+
You can run the tests from the command line.
  
=== TestAPP.All ===<!--T:3-->
+
<!--T:26-->
Add test funtion
+
Run all tests:
  
=== BaseTests ===<!--T:5-->
+
</translate>
Add test funtion
+
{{Code|code=
 +
freecad --run-test 0
 +
}}
 +
<translate>
  
=== UnitTests ===<!--T:6-->
+
<!--T:27-->
Add test funtion
+
Run only some the specified unit test, for example:
  
=== Document ===<!--T:7-->
+
</translate>
Add test funtion
+
{{Code|code=
 +
freecad --run-test TestDraft
 +
}}
 +
<translate>
  
=== UnicodeTests ===<!--T:8-->
+
== Test menu == <!--T:29-->
Add test funtion
 
  
=== MeshTestsApp ===<!--T:9-->
+
<!--T:30-->
Add test funtion
+
Each top level directory in FreeCAD should have a file with the tests that can be run for that particular workbench or module. The file usually starts with the word {{incode|Test}}.
  
=== TestSketcherApp ===<!--T:10-->
+
<!--T:31-->
Add test funtion
+
To run a test from within FreeCAD, switch to the Test Workbench, then {{MenuCommand|Test commands → TestToolsGui → Self test → Select test name}}, then enter the name of the Python file with the tests; for example, for the [[Draft Workbench|Draft Workbench]], this would be {{MenuCommand|TestDraft}}, then press {{Button|Start}}.
  
=== TestPartApp ===<!--T:11-->
+
== Test functions == <!--T:19-->
Add test funtion
+
This is the list of test apps as of 0.15 git 4207:
  
=== TestPartDesignApp ===<!--T:12-->
+
=== TestAPP.All === <!--T:3-->
Add test funtion
+
Add test function
  
=== Workbench ===<!--T:13-->
+
=== BaseTests === <!--T:5-->
Add test funtion
+
Add test function
  
=== Menu ===<!--T:14-->
+
=== UnitTests === <!--T:6-->
Add test funtion
+
Add test function
  
=== Menu.MenuDeleteCases ===<!--T:15-->
+
=== Document === <!--T:7-->
Add test funtion
+
Add test function
  
=== Menu.MenuCreateCases ===<!--T:16-->
+
=== UnicodeTests === <!--T:8-->
Add test funtion
+
Add test function
 +
 
 +
=== MeshTestsApp === <!--T:9-->
 +
Add test function
 +
 
 +
=== TestDraft === <!--T:28-->
 +
Add test function
 +
 
 +
=== TestSketcherApp === <!--T:10-->
 +
Add test function
 +
 
 +
=== TestPartApp === <!--T:11-->
 +
Add test function
 +
 
 +
=== TestPartDesignApp === <!--T:12-->
 +
Add test function
 +
 
 +
=== Workbench === <!--T:13-->
 +
Add test function
 +
 
 +
=== Menu === <!--T:14-->
 +
Add test function
 +
 
 +
=== Menu.MenuDeleteCases === <!--T:15-->
 +
Add test function
 +
 
 +
=== Menu.MenuCreateCases === <!--T:16-->
 +
Add test function
  
 
<!--T:17-->
 
<!--T:17-->
{{docnav|Debugging|Branding}}
+
{{docnav
 +
|[[Debugging|Debugging]]
 +
|[[Continuous Integration|Continuous Integration]]
 +
}}
 +
 
 +
<!--T:21-->
 +
{{Userdocnavi}}
  
<!--T:18-->
+
<!--T:22-->
 
[[Category:Developer Documentation]]
 
[[Category:Developer Documentation]]
  
 +
<!--T:23-->
 +
[[Category:Test Framework]]
 +
 +
<!--T:24-->
 +
[[Category:Workbenches]]
 +
[[Category:Testing]]
 
</translate>
 
</translate>
{{clear}}
 
<languages/>
 

Revision as of 10:58, 29 October 2019

Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎italiano • ‎polski • ‎română • ‎русский • ‎svenska • ‎Türkçe • ‎中文(中国大陆)‎

Workbench Test.svg

Introduction

The Test Framework Workbench is not really a modelling workbench, but it contains a set of Python scripts to perform different tests on the core components of FreeCAD, in order to debug problems. See also debugging.

You can run the tests from the command line.

Run all tests:

freecad --run-test 0

Run only some the specified unit test, for example:

freecad --run-test TestDraft

Test menu

Each top level directory in FreeCAD should have a file with the tests that can be run for that particular workbench or module. The file usually starts with the word Test.

To run a test from within FreeCAD, switch to the Test Workbench, then Test commands → TestToolsGui → Self test → Select test name, then enter the name of the Python file with the tests; for example, for the Draft Workbench, this would be TestDraft, then press Start.

Test functions

This is the list of test apps as of 0.15 git 4207:

TestAPP.All

Add test function

BaseTests

Add test function

UnitTests

Add test function

Document

Add test function

UnicodeTests

Add test function

MeshTestsApp

Add test function

TestDraft

Add test function

TestSketcherApp

Add test function

TestPartApp

Add test function

TestPartDesignApp

Add test function

Workbench

Add test function

Menu

Add test function

Menu.MenuDeleteCases

Add test function

Menu.MenuCreateCases

Add test function