SmarteStudio
September 24, 2017, 01:55:08 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: SmarteStudio forum launched!
 
   Home   Help Search Login Register  
Pages: [1] 2 3 ... 10
 1 
 on: August 09, 2013, 11:21:55 AM 
Started by SmarteStudio Support Team - Last post by SmarteStudio Support Team
On first start of the SmarteStudio License Monitor a Windows Security Alert will appear. Please "Allow Access" for SmarteStudioProtector  in Windows Firewall, which allows communications from client machines to the SmarteStudio License Monitor.

 2 
 on: June 24, 2013, 04:00:51 AM 
Started by mykung11 - Last post by SmarteStudio Development Team
Please, see an example published here: http://smartesoft.s3.amazonaws.com/smartestudio/samples/UsingDB.zip

It works with MS Access database (included with example). However it may be changed to work with any other DB that is accessible using ADODB protocol.

The only thing that varies between databases is the connection string.

For MS Access it is:
Code:
var strCnxn = "driver={Microsoft Access Driver (*.mdb)};dbq="+Global.GetFullPath('MSAccess.mdb');

If one needs MS SQL then it should be like:
Code:
strCnxn = "PROVIDER=SQLOLEDB;SERVER="+server+";UID="+user+";PWD="+password+";DATABASE="+db_name;

For MySQL the connection string is like that:

Code:
strCnxn = "mysql://"+user+":"+password+"@"+server+"/"+db_name+"?persist";

In each case user, password, server, db_name - are variables containing corresponding values. These may be replaced right in the connection string like that:

Code:
strCnxn = "mysql://root:admin@localhost/test_data?persist";

 3 
 on: June 07, 2013, 02:36:03 PM 
Started by mykung11 - Last post by mykung11
Try to attach MySQL and MS SQL database, and get the data feed from those two type of database.
Thanks.

 4 
 on: March 01, 2012, 10:45:55 AM 
Started by SSlattery - Last post by SmarteStudio Development Team

Very good idea!
We posted a sample test with working example for "Launching Test from Other Test" section at http://smartestudio.com/wiki/index.php?title=Passing_Test_Parameters#Launching_Test_from_Other_Test

Any feedback or questions are welcome

 5 
 on: March 01, 2012, 09:48:55 AM 
Started by SSlattery - Last post by SmarteStudio Development Team
The first function "LoadObjects" should work correctly. Probably there is some misunderstanding in goals that object loading should meet.

Here is attached sample script (test + 2 subtests). Objects are separated by type: Button objects are stored in ButtonObjects.objects.js and radio buttons are in RadioObjects.objects.js.

This example is working so you may execute it to see results.

If you think that it misses some important scenario then please, try to explain it here in terms of this test so that we can extend it and comment properly.

 6 
 on: March 01, 2012, 01:19:14 AM 
Started by SSlattery - Last post by SmarteStudio Development Team
There are two places in this code that contain wrong syntax:

1) if (g_object_info_map[go] = myO){
2) if(pushB = true){

= - is assignment operator,
== - it is required to use double equal sign for comparison purposes.

Another problem is that Objects are compared by their references (g_object_info_map[go] == myO), in this case objects with equal contents may be treated as not equal. So, the better way is to use names of objects inside  'saved_script_objects' map.

It is better to change the code this way:

Code:
/**********************************************************************
Iterate list of saved_script_objects and push each object to the
end of the script's stack if the object isn't already in the stack.  
**********************************************************************/
function loadObjects(objectsPath){
// Load an array of objects from file
var saved_script_objects = {};
if(objectsPath&&g_helper.FileExists(objectsPath)){
eval(g_helper.Include(objectsPath));
}
// Iterate through the newly loaded map
for (var so in saved_script_objects) {
// ...checking to see if each object is already loaded.
if (!g_object_info_map.hasOwnProperty(so)) {
      // If not, push it to the script's object stack.
g_object_info_map[so] = saved_script_objects[so];
}
        }
}

 7 
 on: February 27, 2012, 04:30:43 PM 
Started by SSlattery - Last post by SSlattery
I wasn't sure if there would be a problem loading duplicate objects.

There doesn't seem to be a way to find an object in an array like you can with .NET collections, using a predicate, so a pair of nested loops will have to do:

Code:
/**********************************************************************
Iterate list of saved_script_objects and push each object to the
end of the script's stack if the object isn't already in the stack. 
**********************************************************************/
function loadObjects(objectsPath){
// Load an array of objects from file
var saved_script_objects = {};
if(objectsPath&&g_helper.FileExists(objectsPath)){
eval(g_helper.Include(objectsPath));
}
// Iterate through the newly loaded array
for (var so in saved_script_objects) {
var myO = saved_script_objects[so];
var pushB = true;
// ...checking to see if each object is already loaded.
for(var go in g_object_info_map) {
if (g_object_info_map[go] = myO){
pushB = false;
}
}
// If not, push it to the script's object stack.
if(pushB = true){
g_object_info_map.push(myO);
}
}
//It's ugly, but works. :p
}

 8 
 on: February 15, 2012, 03:29:01 PM 
Started by SSlattery - Last post by SSlattery
I finally got a chance to use this function.

It works beautifully.

It will function as expected if you use it within the Test() function of either a parent or child test. It does not work if you try to use it outside of the Test function of either a parent or child test.

Nifty.

 9 
 on: February 03, 2012, 03:25:12 PM 
Started by SSlattery - Last post by SSlattery
It looks like there should be a linked example file in the wiki: http://smartestudio.com/wiki/index.php?title=Passing_Test_Parameters#Launching_Test_from_Other_Test

 10 
 on: February 03, 2012, 10:52:36 AM 
Started by SSlattery - Last post by SSlattery
I was looking at this while trying to set up a test/subtest in which I pass an object as the optional parameter:
Code:
function Test()
{
// Execute other test
Global.DoInvokeTest('c:\\tests\\paramtest.sstest', {myVar: "aValue", myOtherVar: "aColor"});
}


I dangerously assumed that I needed to define same named variables in both the parent and child scripts. I tried to pass an array or object this way:
Code:
{
// Execute other test
Global.DoInvokeTest('c:\\tests\\paramtest.sstest', {myObject: myVarContainingObject});
}


...and this way:
Code:
{
// Execute other test
Global.DoInvokeTest('c:\\tests\\paramtest.sstest', {myObject});
}


After looking through the samplescripts, I haven't found one that demonstrates passing variable parameters. JScript doesn't seem to care what the variable is and treats them all like objects, so, I'm wondering how I'd do something like what I attempted in the second code snippet.
Thanks,
-S

Pages: [1] 2 3 ... 10
Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!