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

  • SEARCH
  • Home
  • 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 6149561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:28:20+00:00 2026-05-23T19:28:20+00:00

I have a test case (it is really an integration test) which logs in

  • 0

I have a test case (it is really an integration test) which logs in with a username containing Scandinavian letters. The problem is that when I run the Ant task from command line, the authentication fails because the encoding is not correct (it should be UTF-8). The test runs just fine when I run it from Eclipse, but not from command line. So far I’ve tried to tell the correct encoding to Ant both in the Ant target:

<target name="run_tests">
    <junit fork="no" haltonfailure="no">
        <jvmarg value="-Dfile.encoding=UTF-8"/>
        <formatter type="xml" usefile="true" />
        <classpath refid="test.classpath" />
        <test name="com.company.integration.AllIntegrationTests" />
    </junit>
</target>

and from the command line:

ant -D"file.encoding=UTF-8" run_tests

Neither of these work. Whatever I do, the tests still fail and the test report says:

<property name="file.encoding" value="cp1252" />

Like I said, if I run it from Eclipse, everything works beautifully. I also noticed that if I modify the run configuration in Eclipse for the test by changing the encoding to ISO-8859-1, the test fails like expected. So obviously it is possible to change the encoding, but how do you do it?

  • 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-23T19:28:21+00:00Added an answer on May 23, 2026 at 7:28 pm

    You will need to use fork=yes to execute JUnit in a separate JVM.

    As it is, file.encoding is being inherited from Ant’s JVM and is not overridden by your jvmarg.

    See the documentation for jvmarg in the JUnit Task manual page:

    If fork is enabled, additional
    parameters may be passed to the new VM
    via nested elements.

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

Sidebar

Related Questions

I have this test case def setUp(self): self.user = User.objects.create(username=tauri, password='gaul') def test_loginin_student_control_panel(self): c
I have a Selenium test case that enters dates into a date selector made
I have a Boost unit test case which causes the object under test to
This is a minimal test case of some code that I actually have. It
So I have a test case that I want to make into a thread.
I have an application that allows users to upload images. The test case I
I have a test case here: http://www.libsys.und.edu/dev/scroll-test.html It has a DIV containing a very
today I have coded a test case for my application, to see how transactions
I have a simple unit test case (extensive question here ) on a configuration
I have recorded a very simple test case Using the Selenium IDE integrated with

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.