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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T18:08:15+00:00 2026-06-16T18:08:15+00:00

I am having a problem in running an aggregated test suite of selenium tests

  • 0

I am having a problem in running an aggregated test suite of selenium tests using unit-test in python.

Below code is executing the test from another module without the testRunner being called.

When I tried executing in debug mode, the control was passed to pydev_runfiles soon after it executed the class definition line and eventually executed the test in the other module(gmailbutton).

import unittest
from selenium import webdriver
from gmailbutton import gmailButton

class runner():
    def runner1(self):
        suite = unittest.TestSuite()
        suite.addTest(gmailButton)
        return suite

As per the documentation(http://docs.python.org/2/library/unittest.html) the above code had to just add the test case to the suite and test should have executed on

unittest.TextTestRunner(verbosity=2).run(suite)

which is not happening here.

Test code for gmailButton is here

import unittest
from selenium import webdriver


class gmailButton(unittest.TestCase):

    global browser

    def test_gmailButton(self):

        browser = webdriver.Firefox()

        try:
            browser.get("http://www.gmail.com")           
            browser.find_element_by_id("Email").send_keys("abcd")
            browser.find_element_by_id("Passwd").send_keys("123445")
            browser.find_element_by_id("signIn").click()

        except Exception as e:
            raise
            print e

        finally:
            browser.close()

UPDATE:

Here is the exact code I am executing from eclipse.

import unittest
from selenium import webdriver
from gmailbutton import gmailButton
from pyUnitExercise import exercise1

class runner():
    def runner1(self):
        suite = unittest.TestSuite()
        suite.addTest(gmailButton)
        return suite

if __name__ == "__main__":
    unittest.TextTestRunner(verbosity=2).run(runner.suite)

My expectation from this code is to execute gmailButton test case and NOT exercise1 which is just imported and not added to the test suite. I’ve no idea why is it executing the test which was just imported and not added to the test suite.

  • 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-16T18:08:17+00:00Added an answer on June 16, 2026 at 6:08 pm

    If you are using PyDev, you are probably not actually using python’s stdlib unittest. It uses nose and/or py.test:

    http://pydev.org/manual_adv_pyunit.html

    Both of those libraries search for tests via introspection; you don’t need to add explicit entries to a test suite. Without the output from when the tests get run, it’s hard to tell if this is actually what’s going on, though.

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

Sidebar

Related Questions

We are having a problem running integration unit tests in eclipse when using RoboGuice
Im having a problem starting or running any activity unit tests from within eclipse.
I am having a problem running the 'test' Rake task from IntelliJ Idea in
i'm having a problem running an sql in ms-access. im using this code: SELECT
The problem: running the code outright creates the proper filtering, and my unit test
I'm having a problem when running programs that use Java from the command line.
I'm using django with app-engine-patch and I'm having this wierd problem running manage.py dumpdata
I'm having a problem concerning my website not running the code behind an ItemCommand
Im having problem running my little interactive story i wrote in python. I keep
I'm having a problem when running my PHPUnit test of creating a new profile,

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.