Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameterized test suite #683

Closed
montoyo4me opened this issue Mar 18, 2015 · 5 comments
Closed

Parameterized test suite #683

montoyo4me opened this issue Mar 18, 2015 · 5 comments

Comments

@montoyo4me
Copy link

Hi,

I want to make test suite as parameterized. Means I want to execute my FitNesse test for different locales. Right now my test are working fine for English locales but these same tests I want to execute for Chinese,Russian languages.
e.g If I am able to specify comma seperated list of languages to a suite (say suite level variable) then that suite should get executed for all those languages one by one.

In SuiteSetUp I can launch browser (say FireFox) for different languages using Selenium webdriver preferences.

Thanks

@woodybrood
Copy link
Collaborator

The way we typically recommend this is via Symbolic Links (
http://www.fitnesse.org/FitNesse.UserGuide.FitNesseWiki.SymbolicLinks).
You create multiple suites that have variables defined in them that will
inherit down the tree. Then you add a symbolic link to each of them to the
suite that you want to have variable content.

On Wed, Mar 18, 2015 at 8:36 AM, montoyo4me notifications@github.com
wrote:

Hi,

I want to make test suite as parameterized. Means I want to execute my
FitNesse test for different locales. Right now my test are working fine for
English locales but these same tests I want to execute for Chinese,Russian
languages.
e.g If I am able to specify comma seperated list of languages to a suite
(say suite level variable) then that suite should get executed for all
those languages one by one.

In SuiteSetUp I can launch browser (say FireFox) for different languages
using Selenium webdriver preferences.

Thanks


Reply to this email directly or view it on GitHub
#683.

@amolenaar
Copy link
Collaborator

Hi,

You can also provide the “locale” related variables via a config file or via the URL, but personally I prefer Dan’s approach, since it also stores the test results separately.

On 18 Mar 2015, at 14:55, Dan Woodward notifications@github.com wrote:

The way we typically recommend this is via Symbolic Links (
http://www.fitnesse.org/FitNesse.UserGuide.FitNesseWiki.SymbolicLinks http://www.fitnesse.org/FitNesse.UserGuide.FitNesseWiki.SymbolicLinks).
You create multiple suites that have variables defined in them that will
inherit down the tree. Then you add a symbolic link to each of them to the
suite that you want to have variable content.

On Wed, Mar 18, 2015 at 8:36 AM, montoyo4me <notifications@github.com mailto:notifications@github.com>
wrote:

Hi,

I want to make test suite as parameterized. Means I want to execute my
FitNesse test for different locales. Right now my test are working fine for
English locales but these same tests I want to execute for Chinese,Russian
languages.
e.g If I am able to specify comma seperated list of languages to a suite
(say suite level variable) then that suite should get executed for all
those languages one by one.

In SuiteSetUp I can launch browser (say FireFox) for different languages
using Selenium webdriver preferences.

Thanks


Reply to this email directly or view it on GitHub
<#683 #683>.


Reply to this email directly or view it on GitHub #683 (comment).

@montoyo4me
Copy link
Author

Hi,

As suggested by woodybrood I tried Symbolic links are below are my observations.

Lets try with below example,
TestSuite1 contains !define locale {en-us} with below 2 pages
-TestPage1
-TestPage2

Created TestSuite2 with Symbolic link to TestSuite1 by specifying name(say TestSuiteName1) and correct path. Now when I am trying to change value of locale variable from TestSuiteName1 suite it is reflecting in TestSuite1 also obviously because TestSuiteName1 is just link to TestSuite1.
Now how do I specify different locale in TestSuiteName1 suite so that TestSuiteName1 is executing with different locale? What I am doing wrong here?

@amolenaar
Copy link
Collaborator

Variables are resolved from the test page up through the parent pages. Hence, TestPage1 and TestPage2 will always see locale as en-us, since that's defined in TestSuite1.

What you can do, is the following:

  • TestSuiteEnUs ( !define locale {en-us} )
    • TestSuite1
      • TestPage1
      • TestPage2
  • TestSuiteNlNl ( !define locale {nl-nl} )
    • TestSuite1 symlink to .TestSuiteEnUs.TestSuite1
  • etc.

@amolenaar
Copy link
Collaborator

This issue can be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants