Search
 
 

Display results as :
 


Rechercher Advanced Search

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Unable to execute Logout class file

View previous topic View next topic Go down

Unable to execute Logout class file

Post by kanuri on Wed Oct 03, 2012 11:20 am

Hi friends,

I am developing Data driven frame work for login and logout of an application..
Here my problem is i wrote code login and logut by using junit framework. Login class file is gets executed and logout class file is not executed. Here i am not getting any error..

Please tell me any one why my logout file is not executed..

here i included my code..

Code:

TestSuiteRunner.class
package Tests;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;

@RunWith(Suite.class)
@SuiteClasses({LogIn.class,LogOut.class})

public class TestSuiteRunner
{
    public static void main(String[] args)
    {
        // TODO Auto-generated method stub
    }

}

Login.class

package Tests;

import java.io.IOException;
import org.junit.Before;
import org.junit.Test;
//import org.openqa.selenium.By;

import Util.TestUtil;

public class LogIn extends TestBase
{
    @Before
    public void beforetest() throws IOException
    {
        Init();   
    }
    @Test
    public void loginTest() throws IOException
    {
        String URL=CONFIG.getProperty("testSuiteName");
        System.out.println(URL);
        driver.get(URL);
        driver.manage().window().maximize();
        TestUtil.LoginSalesForce();
       
    }
}

Logout.class
package Tests;

import java.io.IOException;

import org.junit.Before;
import org.junit.Test;
//import org.openqa.selenium.By;

import Util.TestUtil;

public class LogOut extends TestBase
{
    @Before
    public void beforetest() throws IOException
    {
        System.out.println("IO Exception");
       
            initialize();
    }
   

   
    @Test
    public void logout()
    {
        System.out.println("IO Exception1");
        TestUtil.logout();
        System.out.println("Page is not unable to logged out.");
    }

}


I wrote the code for login and logut in a seperate class file .. i was accessing login and logout functions from that class file..

Any one please tell me why my logout class file is not exected..

kanuri

Posts : 6
Join date : 2012-09-28
Age : 29
Location : Hyderabad

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum