Skip to main content
replaced http://salesforce.stackexchange.com/ with https://salesforce.stackexchange.com/
Source Link

I would like to configure the ant migration tool so that only test classes are run that we own so no managed package classes. Now i searched on the documentation of the tool and i only find the runAllTests = true, which runs all tests including managed package code.

then i found 2 other posts that are talking about the sf:compileAndTest method in ant where you can specify <runtests namespace="Default"/> but this doesn't seem to work either. there is a post here Get Status Updates When Running Tests with ANT Migration ToolGet Status Updates When Running Tests with ANT Migration Tool

and here How to run tests in the default namespace in a sandbox using AntHow to run tests in the default namespace in a sandbox using Ant

but both don't really answer the question if the <runTests namespace="Default"/> actually works in ant or not.

does this work?

UPDATE:

I checked further the runAllTests=True and seems to run all test classes also the ones from a managed package. I tried with the sample build.xml and the latest Migration toolkit.

<target name="deployCodeCheckOnly">
  <sf:deploy username="[email protected]" password="password" serverurl="https://test.salesforce.com" maxPoll="500" deployRoot="codepkg" runAllTests="true" checkOnly="true"/>
</target>

As outcome of this run it gives me these test class failures which are from managed packages like CRMFusion's DupeBlocker and others

[sf:deploy] Test Failures:
[sf:deploy] 198.  CRMfusionDBR101.DB_UnitTests.testRebuildKeys_MultipleLeads_MultiBatch_SameHash_DupeFirstBatch -- System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Please enter valid country 

[sf:deploy] Request Status: InProgress (487/689)  -- Running Test: DB_UnitTests.test_DB_KeyBuilder_useBatchApexKeyBuilder
[sf:deploy] Request Status: InProgress (493/689)  -- Running Test: DB_UnitTests.test_Db2Upgrade
[sf:deploy] Request Status: InProgress (500/689)  -- Running Test: DB_UnitTests.test_PostInstall

I would like to configure the ant migration tool so that only test classes are run that we own so no managed package classes. Now i searched on the documentation of the tool and i only find the runAllTests = true, which runs all tests including managed package code.

then i found 2 other posts that are talking about the sf:compileAndTest method in ant where you can specify <runtests namespace="Default"/> but this doesn't seem to work either. there is a post here Get Status Updates When Running Tests with ANT Migration Tool

and here How to run tests in the default namespace in a sandbox using Ant

but both don't really answer the question if the <runTests namespace="Default"/> actually works in ant or not.

does this work?

UPDATE:

I checked further the runAllTests=True and seems to run all test classes also the ones from a managed package. I tried with the sample build.xml and the latest Migration toolkit.

<target name="deployCodeCheckOnly">
  <sf:deploy username="[email protected]" password="password" serverurl="https://test.salesforce.com" maxPoll="500" deployRoot="codepkg" runAllTests="true" checkOnly="true"/>
</target>

As outcome of this run it gives me these test class failures which are from managed packages like CRMFusion's DupeBlocker and others

[sf:deploy] Test Failures:
[sf:deploy] 198.  CRMfusionDBR101.DB_UnitTests.testRebuildKeys_MultipleLeads_MultiBatch_SameHash_DupeFirstBatch -- System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Please enter valid country 

[sf:deploy] Request Status: InProgress (487/689)  -- Running Test: DB_UnitTests.test_DB_KeyBuilder_useBatchApexKeyBuilder
[sf:deploy] Request Status: InProgress (493/689)  -- Running Test: DB_UnitTests.test_Db2Upgrade
[sf:deploy] Request Status: InProgress (500/689)  -- Running Test: DB_UnitTests.test_PostInstall

I would like to configure the ant migration tool so that only test classes are run that we own so no managed package classes. Now i searched on the documentation of the tool and i only find the runAllTests = true, which runs all tests including managed package code.

then i found 2 other posts that are talking about the sf:compileAndTest method in ant where you can specify <runtests namespace="Default"/> but this doesn't seem to work either. there is a post here Get Status Updates When Running Tests with ANT Migration Tool

and here How to run tests in the default namespace in a sandbox using Ant

but both don't really answer the question if the <runTests namespace="Default"/> actually works in ant or not.

does this work?

UPDATE:

I checked further the runAllTests=True and seems to run all test classes also the ones from a managed package. I tried with the sample build.xml and the latest Migration toolkit.

<target name="deployCodeCheckOnly">
  <sf:deploy username="[email protected]" password="password" serverurl="https://test.salesforce.com" maxPoll="500" deployRoot="codepkg" runAllTests="true" checkOnly="true"/>
</target>

As outcome of this run it gives me these test class failures which are from managed packages like CRMFusion's DupeBlocker and others

[sf:deploy] Test Failures:
[sf:deploy] 198.  CRMfusionDBR101.DB_UnitTests.testRebuildKeys_MultipleLeads_MultiBatch_SameHash_DupeFirstBatch -- System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Please enter valid country 

[sf:deploy] Request Status: InProgress (487/689)  -- Running Test: DB_UnitTests.test_DB_KeyBuilder_useBatchApexKeyBuilder
[sf:deploy] Request Status: InProgress (493/689)  -- Running Test: DB_UnitTests.test_Db2Upgrade
[sf:deploy] Request Status: InProgress (500/689)  -- Running Test: DB_UnitTests.test_PostInstall
Notice removed Draw attention by Sven Delporte
Bounty Ended with Andrew Fawcett's answer chosen by Sven Delporte
added 1209 characters in body
Source Link
Sven Delporte
  • 1.4k
  • 12
  • 23

I would like to configure the ant migration tool so that only test classes are run that we own so no managed package classes. Now i searched on the documentation of the tool and i only find the runAllTests = true, which runs all tests including managed package code.

then i found 2 other posts that are talking about the sf:compileAndTest method in ant where you can specify <runtests namespace="Default"/> but this doesn't seem to work either. there is a post here Get Status Updates When Running Tests with ANT Migration Tool

and here How to run tests in the default namespace in a sandbox using Ant

but both don't really answer the question if the <runTests namespace="Default"/> actually works in ant or not.

does this work?

UPDATE:

I checked further the runAllTests=True and seems to run all test classes also the ones from a managed package. I tried with the sample build.xml and the latest Migration toolkit.

<target name="deployCodeCheckOnly">
  <sf:deploy username="[email protected]" password="password" serverurl="https://test.salesforce.com" maxPoll="500" deployRoot="codepkg" runAllTests="true" checkOnly="true"/>
</target>

As outcome of this run it gives me these test class failures which are from managed packages like CRMFusion's DupeBlocker and others

[sf:deploy] Test Failures:
[sf:deploy] 198.  CRMfusionDBR101.DB_UnitTests.testRebuildKeys_MultipleLeads_MultiBatch_SameHash_DupeFirstBatch -- System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Please enter valid country 

[sf:deploy] Request Status: InProgress (487/689)  -- Running Test: DB_UnitTests.test_DB_KeyBuilder_useBatchApexKeyBuilder
[sf:deploy] Request Status: InProgress (493/689)  -- Running Test: DB_UnitTests.test_Db2Upgrade
[sf:deploy] Request Status: InProgress (500/689)  -- Running Test: DB_UnitTests.test_PostInstall

I would like to configure the ant migration tool so that only test classes are run that we own so no managed package classes. Now i searched on the documentation of the tool and i only find the runAllTests = true, which runs all tests including managed package code.

then i found 2 other posts that are talking about the sf:compileAndTest method in ant where you can specify <runtests namespace="Default"/> but this doesn't seem to work either. there is a post here Get Status Updates When Running Tests with ANT Migration Tool

and here How to run tests in the default namespace in a sandbox using Ant

but both don't really answer the question if the <runTests namespace="Default"/> actually works in ant or not.

does this work?

I would like to configure the ant migration tool so that only test classes are run that we own so no managed package classes. Now i searched on the documentation of the tool and i only find the runAllTests = true, which runs all tests including managed package code.

then i found 2 other posts that are talking about the sf:compileAndTest method in ant where you can specify <runtests namespace="Default"/> but this doesn't seem to work either. there is a post here Get Status Updates When Running Tests with ANT Migration Tool

and here How to run tests in the default namespace in a sandbox using Ant

but both don't really answer the question if the <runTests namespace="Default"/> actually works in ant or not.

does this work?

UPDATE:

I checked further the runAllTests=True and seems to run all test classes also the ones from a managed package. I tried with the sample build.xml and the latest Migration toolkit.

<target name="deployCodeCheckOnly">
  <sf:deploy username="[email protected]" password="password" serverurl="https://test.salesforce.com" maxPoll="500" deployRoot="codepkg" runAllTests="true" checkOnly="true"/>
</target>

As outcome of this run it gives me these test class failures which are from managed packages like CRMFusion's DupeBlocker and others

[sf:deploy] Test Failures:
[sf:deploy] 198.  CRMfusionDBR101.DB_UnitTests.testRebuildKeys_MultipleLeads_MultiBatch_SameHash_DupeFirstBatch -- System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Please enter valid country 

[sf:deploy] Request Status: InProgress (487/689)  -- Running Test: DB_UnitTests.test_DB_KeyBuilder_useBatchApexKeyBuilder
[sf:deploy] Request Status: InProgress (493/689)  -- Running Test: DB_UnitTests.test_Db2Upgrade
[sf:deploy] Request Status: InProgress (500/689)  -- Running Test: DB_UnitTests.test_PostInstall
Notice added Draw attention by Sven Delporte
Bounty Started worth 50 reputation by Sven Delporte
Tweeted twitter.com/#!/StackSalesforce/status/432009732715737088
added 4 characters in body
Source Link
Sven Delporte
  • 1.4k
  • 12
  • 23

I would like to configure the ant migration tool so that only test classes are run that we own so no managed package classes. Now i searched on the documentation of the tool and i only find the runAllTests = true, which runs all tests including managed package code.

then i found 2 other posts that are talking about the sf:compileAndTest method in ant where you can specify but<runtests namespace="Default"/> but this doesn't seem to work either. there is a post here Get Status Updates When Running Tests with ANT Migration Tool

and here How to run tests in the default namespace in a sandbox using Ant

but both don't really answer the question if the actually<runTests namespace="Default"/> actually works in ant or not.

does this work?

I would like to configure the ant migration tool so that only test classes are run that we own so no managed package classes. Now i searched on the documentation of the tool and i only find the runAllTests = true, which runs all tests including managed package code.

then i found 2 other posts that are talking about the sf:compileAndTest method in ant where you can specify but this doesn't seem to work either. there is a post here Get Status Updates When Running Tests with ANT Migration Tool

and here How to run tests in the default namespace in a sandbox using Ant

but both don't really answer the question if the actually works in ant or not.

does this work?

I would like to configure the ant migration tool so that only test classes are run that we own so no managed package classes. Now i searched on the documentation of the tool and i only find the runAllTests = true, which runs all tests including managed package code.

then i found 2 other posts that are talking about the sf:compileAndTest method in ant where you can specify <runtests namespace="Default"/> but this doesn't seem to work either. there is a post here Get Status Updates When Running Tests with ANT Migration Tool

and here How to run tests in the default namespace in a sandbox using Ant

but both don't really answer the question if the <runTests namespace="Default"/> actually works in ant or not.

does this work?

Source Link
Sven Delporte
  • 1.4k
  • 12
  • 23
Loading