Forum Discussion
I've played with it a bit in an evaluation trial for work. It is really pretty nifty (as is the entire CrossBrowserTesting solution). It will take any automated test (project test item, script, keyword test, etc) and run it against a set of environments of your choice and report back. It really is pretty cool.
A few caveats:
1) It's for web application testing only. So, while it supports mobile environments, the intention is to test how an application renders in a selected browser in a particular mobile environment. You won't be able to automate your custom mobile apps via the Environment Manager
2) Currently, Script Extensions and custom plugins are not supported via Environment Manager. If your projects use either of these, they won't run.
3) I would caution at making too complicated a test via the Environment Manager. The purpose of that feature and CrossBrowserTesting in general is not to test underlying functional code but to test how an application renders and behaves in different browsers (will an app run in Chrome, Firefox, and IE without error, for example?). So, full regression functionality is probably not a good target test case for the Environment Manager.
That's my experience with it. So long as this is fine for you, I personally think it would be worth it.
- nisgupta8 years agoValued Contributor
Thanks for the updates
When developing the scripts what things we need to take care of ?
I need help how to get started with developing the script when running our tests in different browser in Environment manager
Thanks
Nishchal
- AlexKaras8 years agoCommunity Hero
Hi Nishchal,
I am second to everything mentioned by tristaanogre.
As for scripts development, nothing special (except the mentioned problem with Script Extensions) to take care of. It is expected that you will check locally how your test code works with different browsers before running it through the Environment Manager. Obviously, there is no possibility to debug test code on remote machines, so maybe you need to consider proper and descriptive logging.
Otherwise, essentially the Environment Manager is a tool to start required browser for the required OS in the remote environment, deploy your test code there and execute tests there.
- nisgupta8 years agoValued Contributor
Thank you for the updates. I am trying the below scripts . Set the Environment manager to run in browsers - Firefox, Chrome, IE, Microsoft Edge. Sometime the script pass in all browsers. Sometimes it fails in one of the browser. Not sure what need to be updated in the script. Please let me know
function crossBrowserTaxFormsStatus()
{
var url = "https://taxforms.app.texastech.edu/";
var page = Aliases.browser.pageTtusTaxForms
var logoutbtn = Aliases.browser.pageTtusTaxForms.panelTopNav.buttonLogout;
var titlePage = Aliases.browser.pageTtusTaxForms.panelTopNav.textnode1098tTaxForms;
var signInPageTitle = Aliases.browser.pageEraiderWebSignIn.textEraiderSignIn;for(var i = 0; i < Browsers.Count; i++){
browser = Browsers.Item(i);
Log.Message("Browser " + aqConvert.IntToStr(i) + " : " + browser.Description);
browser.Run(url);
LoginCredentials.basicAuthentication();
GeneralFuncs.CheckTitlePage(Aliases.browser.pageTtusTaxForms.panelTopNav.textnode1098tTaxForms);
LoginCredentials.LogOut(logoutbtn);
GeneralFuncs.CheckTitlePage(signInPageTitle);
Aliases.browser.Close();}
//CheckTitlePage
function CheckTitlePage(TitleObj)
{
if(TitleObj.WaitProperty("Exists", true, 5000))
{
Log.Message("The Title of the page is: " +" "+TitleObj.contentText);
}
else
{
Log.Error("Title is not correct/do not exists");
}
}//basicAuthentication
function basicAuthentication(){
var username = ProjectSuite.Variables.Username;
var password = ProjectSuite.Variables.Password;
var page = Sys.Browser().Page("*");
try{
page.Login.TextBox("UserName").SetText(username);
page.Login.Textbox("password").SetText(password);
delay(2000);
page.Login.Button("OK").Click();
page.Wait();
Sys.Browser().BrowserWindow(0).Maximize();
} catch(e){
Log.Error("InvalidPage/Login" +e);
}
}//LogOut
function LogOut(objLogOutPathName)
{
// Delay(5000);
var objLogOutPathNameExists = false;
try{
objLogOutPathNameExists = objLogOutPathName.Exists;
if(objLogOutPathNameExists == true)
{
Log.Message(objLogOutPathName.contentText);
objLogOutPathName.Click();
}
}catch(e){
Log.Error("Error" +e);
}
}