The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:




Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Testing Tools >> Micro Focus/Compuware QALoad

Pages: 1
ppat7046
Active Member


Reged: 02/01/01
Posts: 785
Loc: USA
Read value from single dimensional array
      #716918 - 09/24/12 09:57 AM

Friends,

I like to share following code which validates multiple links.
Our application has links from A to Z. I need to verify each link (total 26).
The script reads value from single dimensional array.

Code:

char *str[] = { "A", "B", "C", "D", "E", "F",0 };
char **w = str;
while(*w)
{
Set(NEXT_REQUEST_ONLY, COOKIE, "SessionCOOKIE", "1");
Set(NEXT_REQUEST_ONLY, COOKIE, "LoginCOOKIE", "true");
Set(NEXT_REQUEST_ONLY, POST_DATA, "currPageConst", "fihome");
Set(NEXT_REQUEST_ONLY, POST_DATA, "LinkMethod", *w++);
Set(NEXT_REQUEST_ONLY, CHECKPOINT_NAME, "Page 60 - Order List");
Post_To("https://XyZ.Hello.COM/WebServer/Ctrl");
Verify(PAGE_TITLE, "Order List");
DO_SLEEP(1);
}



--------------------
Thanks,
Prashant Patel


Post Extras: Print Post   Remind Me!   Notify Moderator  
ppat7046
Active Member


Reged: 02/01/01
Posts: 785
Loc: USA
Re: Read value from single dimensional array [Re: ppat7046]
      #716925 - 09/24/12 12:53 PM

I have enhanced the script to log the pass or fail result to a USER CREATED .txt file.
Code:

char *str[] = { "A", "B", "C", "D", "E", "F",0 };
char **w = str;
while(*w)
{
Set(NEXT_REQUEST_ONLY, COOKIE, "SessionCOOKIE", "1");
Set(NEXT_REQUEST_ONLY, COOKIE, "LoginCOOKIE", "true");
Set(NEXT_REQUEST_ONLY, POST_DATA, "currPageConst", "fihome");
Set(NEXT_REQUEST_ONLY, POST_DATA, "LinkMethod", *w++);
Set(NEXT_REQUEST_ONLY, CHECKPOINT_NAME, "Page 60 - Order List");
Post_To("https://XyZ.Hello.COM/WebServer/Ctrl");
if (Verify(PAGE_TITLE, "Order List") == TRUE )
{
fprintf(fp,"%s %s\n","Pass: Order List page is displayed when Link is clicked:", str[j]);
}
else
{
fprintf(fp,"%s %s\n","Fail: Order List page is displayed when Link is clicked:", str[j]);
}
DO_SLEEP(1);
j++;
}
DO_SLEEP(1);
}



--------------------
Thanks,
Prashant Patel


Post Extras: Print Post   Remind Me!   Notify Moderator  
saharinivas
Member


Reged: 04/24/08
Posts: 199
Re: Read value from single dimensional array [Re: ppat7046]
      #716981 - 09/25/12 07:15 AM

Hi,

QALoad tool now a days lost its importance and Silk Performer took its dominance.

Any way, good info you are sharing. Thanks

Regards,
Mahesh


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 2 anonymous users are browsing this forum.

Moderator:  AJ, DSquared 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 1751

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5