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 9259283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:37:07+00:00 2026-06-18T12:37:07+00:00

When I execute the following I get a strange error: junit.framework.AssertionFailedError: No tests found

  • 0

When I execute the following I get a strange error:
“junit.framework.AssertionFailedError: No tests found in com.ac.spring.login.LoginServiceTest
I am using spring 3.0 with junit 4.x.

Test class:

    @ContextConfiguration(locations={"classpath:META-INF/spring-context.xml","classpath:META-INF/spring-context-test.xml"})
    public class LoginServiceTest extends AbstractJUnit4SpringContextTests{
        @Autowired
        private LoginServiceTestCase loginTestCase;

        @Before
        public void setup() {
        loginTestCase.initialize();
        }

        @After
        public void teardown() {
        }


    @Test
    public void testLoginWithValidAccount() throws Exception {
    loginTestCase.setTestName("Validate Login with valid credentials");
    loginTestCase.setTestCondition(loginTestCase.CONDITION_USERNAME, "...");
    loginTestCase.setTestCondition(loginTestCase.CONDITION_PASSWORD, "...");
    loginTestCase.setExpectedResult(loginTestCase.RESULT_IS_ERROR, false);
    assertTrue(loginTestCase.isTestPass());
    }
....
}

Case to be tested:

public class LoginServiceTestCase extends TestCase{
    @Autowired
    private LoginService loginService; // the class to be tested
    ......
    protected void executeTest() throws Exception {
    try {
.....   } catch (Exception e) {
    isError = true;
    }
    } 

build.xml:

<target name="compile" >
        <echo message="-----> Compile Classes from ${src}" />
        <mkdir dir="${build}/classes" />
        <javac  srcdir="${src}"
                includes="**/*.java"
                destdir="${build}/classes"
                debug="on">
            <classpath refid="dependencies"/>
        </javac>
        <copy todir="${build}/classes/META-INF">
            <fileset dir="${basedir}/config" includes="**"/>
        </copy>
    </target>

<target name="batch-test" >
        <mkdir dir="${reports.tests}"/>
        <junit printsummary="yes" haltonfailure="yes">
          <classpath>
            <pathelement location="${build}/classes"/>
            <path refid="dependencies"/>
          </classpath>

          <formatter type="plain"/>
          <formatter type="xml"/>

          <batchtest fork="yes" todir="${reports.tests}">
            <fileset dir="${src}">
              <include name="**/*Test.java"/>
            </fileset>
          </batchtest>
        </junit>
    </target>

Where am I going wrong?

  • 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-06-18T12:37:08+00:00Added an answer on June 18, 2026 at 12:37 pm

    Wanted to close this question – but just wanted to inform the problem was with the ant version.Moving up from ant 1.5 to 1.7 took care of the issue.

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

Sidebar

Related Questions

When I execute the following function, I get an error: Error 'Excel1.WebServiceFunctions.CreateMyTask()': not all
I get the following error when I try and execute the code down below.
I get the following Nhiberante error, but have no idea why: could not execute
if i execute the following code i get a cannot convert to object error;
When I execute the following query, I get an exception telling me that 'feedItemQuery'
I have the following stored procedure that I have to get data from: EXECUTE
having a strange issue here. I have ~/Library/LaunchAgents/com.me.helloworld.plist with the following contents: <?xml version=1.0
I get the following error after I change the rootViewControler of my UIWindow. 2012-10-16
I'm having a strange issue when using subprocess.Popen.communicate(). For background, I want to execute
I am facing a strange error when I execute a php mail script. Its

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.