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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:31:42+00:00 2026-06-02T02:31:42+00:00

I’m a tester working with automation and recently looking into webdriver and I get

  • 0

I’m a tester working with automation and recently looking into webdriver and I get the idea with pageObjects and how to run tests with Nunit for example.
My problem is that I don’t want to run tests in a predefined order. The GUI-automation solution we currently have uses ModelBasedTesting tool GraphWalker to generate the testsequence at execution and I would like to continue with that approach.

It works like this in short: A graph contains action- and verificationsteps and some logic to determine how to “walk the graph”. Each step represent a method to be executed in webdriver.

I could of course make a lot of methods and call them one by one, but then I would not have the nice support of a testing framework like Nunit or the structure of PageObjects.

What I (think) I would like is:

[TestFixture]
public abstract class LoginTest : TestFixtureBase
{
    [Test]
    public void e_test1()
    {
        loginPage = PageBase.GetInstance<Login>(driver, "Title");                
        accountHome = loginPage.MainLogin(username, password);
        Assert.IsTrue(accountHome.UserLoggedIn(),"fail");
    }
    [Test]
    public void v_test1()
    {
        loginPage = accountHome.LogOut();
        Assert.IsTrue(loginPage.UserLoggedOut(), "Fail");
    }
    .
    .
    .
    [Test]
    public void e_testN()
    {
        //Do something
    }

And then when i run the graph it gives me “e_test2” as a first step and the magic code runs e_test2(). Next step is “v_test1” so that test is executed.
Anyone knows how to do this?

Update:
I’ve tried the TestCaseSource attribute and got it working, but only when it runs the graph prior the test and returns the complete sequence. I’m looking for a way to execute one step at the time “online”.
This works:

    [Test, TestCaseSource("RunModel")]
    public void LoginAndOut(string method)
    {
        object obj = this.GetType().InvokeMember(method, BindingFlags.InvokeMethod | BindingFlags.Instance | BindingFlags.Public, null, this, null);
    }

    public string[] RunModel()
    {
        List<string> methods = new List<string>();
        while (Model.graphWalker.HasNextStep())
        {
            methods.Add(Model.graphWalker.GetNextStep().ToString());
        }
        return methods.ToArray();
    }

But I would like to accomplish something like:

    while (Model.graphWalker.HasNextStep())
        {   //Get next method from GraphWalker Soap-service.
            nextMethodToRun = Model.graphWalker.GetNextStep().ToString());
            //handle Method result, if ok continue.
        }
  • 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-02T02:31:43+00:00Added an answer on June 2, 2026 at 2:31 am

    Gave up on NUnit and found the solution with Gallio/MbUtnit and DynamicTestFactory.
    works just as intended.

        [DynamicTestFactory]
        public IEnumerable<Test> LoginAndOut() 
        {
            string method;
            while (Model.graphWalker.HasNextStep())
            {
                method=Model.graphWalker.GetNextStep().ToString();
                if (method == string.Empty)
                    break;
                yield return new TestCase(method, () =>
                    {
                        object obj = this.GetType().InvokeMember(method, BindingFlags.InvokeMethod | BindingFlags.Instance | BindingFlags.Public, null, this, null);
                    });
            }
         }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
i got an object with contents of html markup in it, for example: string
I am currently running into a problem where an element is coming back from
I'm working with an upstream system that sometimes sends me text destined for HTML/XML

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.