Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0035166Openbravo ERPA. Platformpublic2017-02-06 11:412017-03-15 20:19
shuehner 
alostale 
normalminorhave not tried
closedfixed 
5
 
3.0PR17Q2 
caristu
Core
No
0035166: Allow junit testclasses and test-method to be selectively skipped (when running tests against i.e. addon modules)
Many junit tests in pi directly or indirectly depend on either unmodified AD data from pi or data in i.e. F&B sample data.

This makes those test fail when running i.e. ant run.all.tests against a set of addon modules (i.e. in a customer project).

It would be useful to be able to blacklist those selectively on granularity:
a.) Whole testclass
b.) Test method

For example the datasourceWithNoManualWhereParameter test here shows both problem in combination.
It's last assert in the 'has implicit filter' codepath needs both
- F&B sampledata ad_user row present
- Not have hqlfilterclause (definition of implicit filter) removed.

As it tests that a specific row is not visible with the implicit filter applied, but visible with it applied.
https://ci.openbravo.com/job/mod-simple/10094/testReport/junit/org.openbravo.test.datasource/DataSourceWhereParameter/datasourceWithNoManualWhereParameter_User_datasource_/ [^]
No tags attached.
related to defect 0035117 closed alostale unstable DataSourceWhereParameter tests 
related to feature request 0048499 closed ablasco allow to disable junit tests by package 
Issue History
2017-02-06 11:41shuehnerNew Issue
2017-02-06 11:41shuehnerAssigned To => platform
2017-02-06 11:41shuehnerModules => Core
2017-02-06 11:41shuehnerTriggers an Emergency Pack => No
2017-02-06 11:41shuehnerRelationship addedrelated to 0035117
2017-02-06 12:35alostaleAssigned Toplatform => alostale
2017-02-06 12:36alostaleReview Assigned To => caristu
2017-02-06 12:36hgbotCheckin
2017-02-06 12:36hgbotNote Added: 0094075
2017-02-06 12:36hgbotStatusnew => resolved
2017-02-06 12:36hgbotResolutionopen => fixed
2017-02-06 12:36hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/87f935ef1ddeb00025c69b0796c32efd891b1027 [^]
2017-02-06 12:38alostaleNote Added: 0094076
2017-02-06 13:27hgbotCheckin
2017-02-06 13:27hgbotNote Added: 0094082
2017-02-10 11:03caristuNote Added: 0094215
2017-02-10 11:03caristuStatusresolved => closed
2017-02-10 11:03caristuFixed in Version => 3.0PR17Q2
2017-02-10 11:04caristuNote Edited: 0094215bug_revision_view_page.php?bugnote_id=0094215#r14551
2017-03-15 20:19hudsonbotCheckin
2017-03-15 20:19hudsonbotNote Added: 0095160
2017-03-15 20:19hudsonbotCheckin
2017-03-15 20:19hudsonbotNote Added: 0095162
2022-01-28 07:27alostaleRelationship addedrelated to 0048499

Notes
(0094075)
hgbot   
2017-02-06 12:36   
Repository: erp/devel/pi
Changeset: 87f935ef1ddeb00025c69b0796c32efd891b1027
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon Feb 06 12:35:12 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/87f935ef1ddeb00025c69b0796c32efd891b1027 [^]

fixed issue 35166: test cases can be disabled by configuration

  Now it's possible to define a list of test cases to be skipped. This is done
  by creating a file named disabled-test in config directory, this file can contain
  a list of either fully qualified class names to be completelly skipped and/or
  fully qualified class names followed by "." method name to skip individual test
  cases.

---
M src-test/src/org/openbravo/test/base/OBBaseTest.java
---
(0094076)
alostale   
2017-02-06 12:38   
Doc: http://wiki.openbravo.com/wiki/How_to_create_JUnit_testcases#Skipping_test_cases [^]
(0094082)
hgbot   
2017-02-06 13:27   
Repository: erp/devel/pi
Changeset: 3e45f4c8e290bbf52b764e558ea0461e34cd237b
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon Feb 06 13:25:36 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/3e45f4c8e290bbf52b764e558ea0461e34cd237b [^]

related to issue 35166: don't use JDK8 api

---
M src-test/src/org/openbravo/test/base/OBBaseTest.java
---
(0094215)
caristu   
2017-02-10 11:03   
(edited on: 2017-02-10 11:04)
Code reviewed + tested OK:

- It is possible to skip all the tests of a class which extends OBBaseTest
- It is possible to skip a particular test of a class which extends OBBaseTest

(0095160)
hudsonbot   
2017-03-15 20:19   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/54e102bef53e [^]
Maturity status: Test
(0095162)
hudsonbot   
2017-03-15 20:19   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/54e102bef53e [^]
Maturity status: Test