Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6930655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:28:32+00:00 2026-05-27T11:28:32+00:00

When unit testing with Ivy, is it best practice to put the test dependencies

  • 0

When unit testing with Ivy, is it best practice to put the test dependencies into the Ivy.xml file for the target binary you are building? Or should they be in a separate Ivy.xml file for the test project you are building?

I’m using Ant build files on my Jenkins build server.

Originally I planned to run the Unit test project after the target binary’s build, but then my uploads to Artifactory got confused as the last ivy resolve was done for the test dependencies, not the target binary.

If I place the test dependencies in the actual binary’s Ivy.xml, I get the following error:

“a module is not authorized to depend on itself”

…but my test depends on the target binary that I’m building.

Should the test project’s Ivy.xml file not actually list the target binary as a dependency?

Update

I have the dependencies now in the target binary’s Ivy.xml.

I’ve flagged the new depencencies as having a “test” configuration to set them apart from the dependencies needed for the target binary.

I’m now working out how to point my test project at the binary produced by the build of the target project. I’m not sure if this is technically an issue with Ivy.

After I build the target binary, should I have a relative path reference from the test project to the target binary?

Another idea is to publish the target binary to the local cache, and then reference it from there in the target project.

Update 2

I ended up using the ant copy task to copy the binary built from target project to the folder with the target project’s dependencies in it. Since the test project dependencies are in this folder, the target project can locate the target binary.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T11:28:33+00:00Added an answer on May 27, 2026 at 11:28 am

    Agreeing with Mark O’Connor’s comment:

    Best practice with unit testing in general is to run the tests on the compiled code before packaging it.

    I would recommend including your call to your unit tests as a step after compilation, and before packaging. Most of the time, you don’t want to package and upload code to an artifact manager if it has failing tests (unless you have some form of special circumstances).

    All of this implies that the tests should occur in the same Jenkins job. You can build both DLL’s, have them refer to each other using relative paths, and execute tests, all in the same job. Then you can upload your binary to Artifactory, confident that it passes tests.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Unit testing is, roughly speaking, testing bits of your code in isolation with test
Unit testing sounds great to me, but I'm not sure I should spend any
During unit testing I need to decorate my methods with Test attributes as shown
Should unit testing be run in debug or release mode? I am using Visual
I am wondering if unit testing private methods is a good practice? Normally only
Duplicate: Unit Testing the Views? Is there any way to unit test View? I
I'm using the unit testing framework in .NET in C++/CLI to test unmanaged C++
I am using .net unit testing in my project. I can unit test, get
For the purposes of unit testing, I would like to validate that two xml
For unit testing you shouldn't test private methods, yes, but for integration tests (using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.