HttpUnit Doubt
Hi,
I papread one test case using HttpUnit, every thing is ok.
my task is Open one webpage, this page contain un and password, one submit button and three Links,
i entered username and password through test case working ok
i created another method click one Link that is also ok, in same method i click another Link showing error( means once click page going to that link page).
we must create each link click separate method? , or any command in HttpUnit click on IE back button?
Looks like the user should be logged in before visiting to the next page.
Similar Messages
-
I am new to HttpUnit.
I am developing test cases using HttpUnit tool. One of it is"login" test case wherein a HttpUnit class method will submit a request and after getting the response it'll fill user id and password and again submit it.
There are certain doubts I have please clarify them.
1. I started the server and executed the test without pulling the page on the browser. It showed me follwing error:
[java] 1) testGetLoginPage(org.synchronoss.gateway.webclient.httpaction.LoginActionTe
st)com.meterware.httpunit.HttpNotFoundException: Error on HTTP request: 404 Not Found [http://localhost:7001/sales/client]
Then I pulled up the page through url in the browser and ran the test this time it ran fine.(Test upto here was just to check loading of login page and not filling user id and password and submitting it.)
So I concluded that we need to open the page that we want to test in the browser and then run test . Am I right?
2. Now after adding more code for filling up the user id and password and submitting the form to test the successfull login. I am not able to do it successfully. Below I have mentioned the code.
Please note: we have used form based authentication mechanism which means that we have <form action="j_security_check"> in the form of login page
public void testGetLoginPage() throws Exception
WebConversation webConversation = new WebConversation();
String url = protocol + "://" + hostname + ":" + port + path;
WebRequest webRequest = new GetMethodWebRequest(url);
WebResponse webResponse = webConversation.getResponse(webRequest);
WebForm webForm = webResponse.getForms()[0];
String formAction = webForm.getAction();
SubmitButton btLogin = (SubmitButton)webForm.getSubmitButton("login", "Login");
webForm.setParameter( "j_username", "achauhan_se_cmg" );
webForm.setParameter( "j_password", "Omniglobe1" );
WebResponse newPage = webForm.submit(btLogin);
WebTable webTable = webResponse.getTableStartingWith("eContract Tool");
and the error that i a getting is
[java] 1) testGetLoginPage(org.synchronoss.gateway.webclient.httpaction.LoginActionTe
st)com.meterware.httpunit.HttpNotFoundException: Error on HTTP request: 404 Not Found [htt
p://localhost:7051/sales/public/j_security_check]
Can Somebody help please
thanks in advanceDouble post:
http://forum.java.sun.com/thread.jspa?threadID=641105 -
hi i have a doubt....
in fbl1n transaction, there are open items and cleared items.
in it the cleared items for certain document types such as invoice etc is not present in the open item table (bsik)
however the cleared items for document types such as general voucher its present in the open items table (bsik)
is this possible as all cleared item entries shld b present in the open item table with an indicator set for cleared or not...
plz exlain!Hi
There are 2 tables(open and Closed Items) in FI for Account Payables and Account Receivables and GL accounts
1.Account payables: BSIK is Open Items and BSAK is Closed items
2.Account Receivables; BSID and BSAD for OPEN and closed items
3/GL accounts : BSIS and BSAS for Open and Closed Items
<b>Reward points for useful Answers</b>
Regards
Anji -
Doubt in creation of a new object
Hi All,
I have one doubt in creation of a new object.If a new object is to be created and it is not a subtype
of any existing object, then what should we enter in the Program field for creating the object?
I hope I am clear with my question.
Thanks in Advance,
Saket.Hi Saket,
Following will be required for created a custom business object.
1. Object Type - ZTEST (Internal Techincal Key)
2. Object Name - ZTESTNAME (Technical Key Name)
3. Name - TEST (Name of BO, it is used while selecting the object type)
4. Description - (Short Description of BO)
5. Program - ZTESTPROGRAM (ABAP program in which the methods of the object type are implemented)
6. Application - A or B.. etc (Area to which your BO is related)
Please remember that you can learn these basic things by giving F1 help on those fields and in HELP.SAP.COM.
Regards,
Gautham Paspala -
Hi Everyone,
Can we read and validate the attachment of the mail.If so how to do it.
Thanks in advance,
SakthiHi Sakthi,
Please refere the below links:
http://help.sap.com/saphelp_nw2004s/helpdata/en/ad/bf93409c663228e10000000a1550b0/frameset.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/0d/52b240ac052817e10000000a1550b0/frameset.htm
Let me know if you have any doubts regarding this.
Thanks,
sekhar. -
PI' RFC Connection pool doubt.
Hi PI exports:
i have a doubt about pi' RFC Connection pool ,pi RFC receive channel can set the conn pool size ,but when start the rfc receiver channel ,is there always only one Connection pool ,or there is only one Connection pool instance?
thinks
Edited by: kevin liang on Oct 19, 2009 6:45 AMHi,
Connection poolins size means how many number of connection you want to make open to send data to ECC, We can define maximum number of connection in Receiver RFC Adapter,Go to additional parameters section and define Max Number of connection give the number there,thats it.Internally it works as Connection poolin mechanism.
Regards,
Raj -
Small Doubt Regarding SY-MANDT
Hi All,
SELECT changenr FROM cdhdr CLIENT SPECIFIED INTO CORRESPONDING FIELDS OF TABLE it_cdhdr
WHERE mandant = syst-mandt
AND objectclas = 'MATERIAL'
AND objectid = wa_matl-matnr
AND tcode = 'MM02'.
I have written the select stament as shown above.
In this i have a doubt like adding a field sy-mandt in the where condition will increase the Efficiency of program or not.
regards,
raghu.Hi..
No doubt the efficency would be affected but from business point of view there will many things that need to be checked as in:
If you are viewing data from CDHDR and CDPOS which is client specific then you are not viewing complete data.
These tables give us and document changes made to a particular object in SAP but if anything is cross client like company code(lets assume) then changes to it wont be visible in all the clients..
so there can be some key information you can miss out while working on some of the objects.
else in this case its good to make query cross client.
regards
vishal -
Doubts with control break statements on internal table loops (AT/ENDAT)
Hi, i've had a couple of doubts for a long while which I hope someone can clarify today:
1) I know how to use the AT statements, however, i'm not sure I get correctly what this part of help regarding this commands means:
<i>"The control level structure with internal tables is static. It corresponds exactly to the sequence of columns in the internal table (from left to right). In this context, the criteria according to which you sort the internal table are unimportant."</i>
I've always sorted the internal table before the control break and it works that way. For example:
SORT ITAB BY EBELN EBELP.
LOOP AT ITAB.
AT NEW EBELN.
* Code for the order header
ENDAT.
ENDLOOP.
If I <b>don't</b> sort the internal table, it doesn't work! (i get dupplicated processing). In the example, if i have more than one register with the same EBELN and they're not consecutive, the header gets processed twice. I really don't get that part of the help text.
2) I know this: <i>"At the start of a new control level (i.e. immediately after AT), the following occurs in the output area of the current LOOP statement:
All character type fields (on the right) are filled with "*" after the current control level key.
All other fields (on the right) are set to their initial values after the current control level key."</i>
My doubt is: WHY is that this way? Because sometimes (most times) I need those fields INSIDE the statement! So when that happened i've solved it in one of three ways:
LOOP AT ITAB INTO WA_ITAB.
WA_ITAB_AUX = WA_ITAB.
AT NEW FIELD.
WA_ITAB = WA_ITAB_AUX.
* ...Rest of the code for the first register
ENDAT.
ENDLOOP.
LOOP AT ITAB INTO WA_ITAB.
AT NEW FIELD.
READ TABLE ITAB INDEX SY-TABIX INTO WA_ITAB.
* ...Rest of the code for the first register
ENDAT.
ENDLOOP.
* (Without AT)
LOOP AT ITAB INTO WA_ITAB.
IF WA_ITAB-FIELD <> FIELD_AUX.
FIELD_AUX = WA_ITAB_FIELD.
* ...Rest of the code for the first register
ENDIF.
ENDLOOP.
Is there any problem with this way of coding? Can be done better?
Thank you very much in advance.Hi..,
1)
See if u sort the table on a field on which u r using AT ENDAT .. then all the records which are having the same value for that field will form a group or those reocrds will be at one place.. so when u sort the table for all the records AT ENDAT will get executed onli once..
If u dont sort this table on this field then all these records will be at different places and in between there may be records with different value for this field.. so this AT ENDAT will get executed for each record !!
2)
No u cannot use the Right hand fields of the field in the table .. Because these AT events work as Group based operations... So till that field on which AT ENDAT is working it breaks that record into two groups.. One is the left hand fields including that field.. and right hand fields as another group.. and makes the right hand group as stars ****. Thats y u can observe that even any one field in the left hand group changes the AT ENDAT will get executed !!!!
Hope u understood !!!
regards,
sai ramesh -
CREATE PACKAGE EMP_PKG AS
CURSOR EMP_CUR IS
SELECT EMPNO,DEPTNO,SAL,HIREDATE
FROM EMP
WHERE DEPTNO=30;
PROCEDURE P_EMP;
PROCEDURE P_GET_SAL(V_EMPNO NUMBER);
PROCEDURE P_GET_LOC(V_EMPNO NUMBER);
Now inside my Package Body
INSIDE THE MAINPROCEDURE P_EMP
I WILL BE CALLING THE BELOW TWO PROCEDURES
PROCEDURE P_EMP
BEGIN
FOR I IN EMP_CUR LOOP
P_GET_SAL(I.EMPNO);-- DO I NEED TO LOOP AGAIN IN P_GET_SAL PROC?
P_GET_LOC(I.DEPTNO);
END LOOP;
END;
NOW WHAT IAM DOING IS
in my P_GET_SAL Procedure is
PROCEDURE P_GET_SAL(V_EMPNO NUMBER)
V_SAL EMP.SAL%TYPE;
BEGIN
FOR I IN EMP_CUR LOOP
SELECT SAL INTO V_SAL FROM EMP
WHERE EMPNO=I.EMPNO --DOUBT HERE
END;
I WANT TO KNOW WHETHER I NEED TO LOOP AGAIN
HERE OR INSTEAD OF THAT
PROCEDURE P_GET_SAL(V_EMPNO NUMBER)
V_SAL EMP.SAL%TYPE;
BEGIN
SELECT SAL INTO V_SAL FROM EMP
WHERE EMPNO =V_EMPNO;
END;
SINCE iam calling V_EMPNO WITH CURSOR FROM MY
MAINPROCEDURE ..
WILL THE PROCEDURE USES THE CURSOR VALUES
AND LOOP ITSELF FOR EVERY EMPLOYEE TO
GET THE SALALRY ?
PLEASE LET ME KNOW SINCE MY PACKAGE IS MORE THAN 3000
LINES I cant proceed unless its confirmed i can
do so ..Hi all,
Thanks for Looking into my Problem
I Got answer by MySelf ..i dont need to loop again my sub procedures
if i try to do that iam getting the error
ERROR at line 1:
ORA-06511: PL/SQL: cursor already open
Thank you all once again .. -
Doubt on Rows and Coloums in BEx Query Designer.
Hello, Experts.
I have a Doubt in BEx Query Designer.
In the Rows I have a Fiscal year Period, if the user enters the Fiscal year period for e.g. : 001/2006 .
in the columns i have forecast for the Fiscal year period which user entered ( 001/2006 ), and we have another column pervious ( Prior )fiscal year period ( 001/2005 ).
My Questions is , as we are Restricting with 001/2006 will the query retrieve the values of 2005 or not?
Thanks in Advance .
Sharpyes i am Doing Offest.
I moved this Fiscal year Period to Free char, and i Restricted with Pervious Fical Year period and Fical year period . it worked. but
when i kept this in Rows and deleted Previous Fiscal Year period . it is displaying blanks. in prior years forecast.
is it because i am Ristricting it to only fical year period which user entered
Colums--> Forcast ( User Entered year ) Prior year
Rows
Fiscal year period
Fiscal year period( user enterd )
Thanks -
Application testing using HttpUnit on SAP netweaver EP
Hi,
I'm trying to perform blacbox testing on login page of an application running on SAP netweaver server.
The code in the testClass looks like this:
URL serverUrl = new URL(url);
WebConversation conversation = new WebConversation();
WebRequest request = new GetMethodWebRequest(serverUrl,"");
WebResponse response = conversation.getResponse(request);
assertNotNull("response of url: " + url, response);
WebForm[] logonform = response.getForms();
System.out.println("login form."+logonform.length+".");The length parameter above returns 0.
However when the same Html code for login page is run under IIS server, the length parameter is 2, which is correct.
Same code running under IIS is fine whereas under Netweaver EP server its not returning correct values.
Can anyone help on this matter.
The Html Source for the login page is :
<table valign="middle" align="center" border="0" cellspacing="0" style="margin-top:10">
<tr>
<td colspan="2" valign="Top" width="300" height="24" class="welcome">
Welcome
</td>
</tr>
<tr>
<td colspan="2" valign="Top" >
<table border="1" bordercolordark="#BEBEBE" bgcolor="#FFFFFF" cellspacing="0" cellpadding="0" bordercolorlight="#BEBEBE">
<tr>
<td style="padding-top:10px; padding-left:10px" align="left" valign="top" bgcolor="E9E9E9" bordercolor="#FFFFFF">
<!-- data table starts after this line -->
<FORM name="logonForm" method="post" action="">
<input name="login_submit" type="hidden" value="on">
<input type="hidden" name="login_do_redirect" value="1" />
<input name="no_cert_storing" type="hidden" value="on">
<table border="0" width="301" height="100" align="left" cellspacing="0" valign="top">
<!-- display self-registration link if supposed to do so -->
<tr>
<td align="left" bgcolor="E9E9E9" colspan=2>
<table border="0" cellpadding="0" cellspacing="0" >
<tr>
<td>
<span class="urLblStdBar">New Here?</span>
<a class=urLnk href="/irj/servlet/prt/portal/prteventname/redirectNotify/prteventdata/redirectURL!3d!252firj!252fservlet!252fprt!252fportal!252fprtroot!252fcom.sap.portal.navigation.portallauncher.default/prtroot/com.sap.portal.usermanagement.admin.SelfReg">
<span class=urTxtStd>Register Now...</span>
</a>
</td>
</tr>
</table>
</td>
</tr>
<!-- display error message if there is one -->
<!-- no error message, display placeholder -->
<tr>
<td colspan="2" height="24"></td>
</tr>
<!-- userid -->
<tr>
<td width="161" height="20">
<label class=urLblStd for="logonuidfield">
User ID
<span class=urLblReq> *</span>
</label>
</td>
<td width="183" height="20">
<input style="WIDTH: 21ex" class="urEdfTxtEnbl" id="logonuidfield" name="j_user" type="text" value="">
</td>
</tr>
<!-- password -->
<tr>
<td width="161" height="20">
<label class=urLblStd for="logonpassfield">
Password
<span class=urLblReq> *</span>
</label>
</td>
<td width="183" height="20">
<input style="WIDTH: 21ex" class="urEdfTxtEnbl" id="logonpassfield" name="j_password" type="password">
</td>
</tr>
<!-- authentication scheme -->
<input name="j_authscheme" type="hidden" value="default">
<!-- space above buttons -->
<tr>
<td colspan="2" height="20"> </td>
</tr>
<!-- logon button -->
<tr>
<td colspan="2">
<input style="height:3ex;" class="urBtnStd" type="submit" name="uidPasswordLogon" value="Log on">
</td>
</tr>
<!-- link to certificate logon -->
<!-- logon help -->
<tr>
<td align="left" bgcolor="E9E9E9" colspan=2>
<table border="0" cellpadding="0" cellspacing="0" >
<tr>
<td>
<span class="urLblStdBar"> Logon Problems?</span>
<a class=urLnk href="/irj/servlet/prt/portal/prttarget/uidpwlogon/prteventname/gotoHelpPage/prtroot/com.sap.portal.navigation.portallauncher.default">
<span class=urTxtStd>Get Support</span>
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<!-- data table ends before this line -->
</td>
<td bordercolor="#FFFFFF" >
<table border=0 cellspacing=0 cellpadding=0>
<tr><td>
<img src="/logon/layout/branding-image.jpg" alt="Branding Image" border="0"></td>
</td>
</tr>
<tr>
<td bordercolor="#FFFFFF" >
<img src="/logon/layout/branding-text.gif" alt="" border="0">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<TR>
<TD border=0 width="100%" align="left">
<p class="urLblStdBar">� 2002-2004 SAP AG All Rights Reserved.<br>
<img src="/irj/portalapps/com.sap.portal.runtime.logon/layout/sapLogo.gif" alt="SAP AG" title="SAP AG" width="36" height="18" vspace="3"></p>
</td>
</tr>
</table>
<!-- after including jsp resource umLogonPage.jsp-->
<!-- EPCF: BOB BODY -->
<DIV style="DISPLAY:none">
<FORM name="DSMSender7fd6ba4208a6c5848735af08fc824465" action="" method="POST" target="" >
<input type="hidden" name="TermString">
<input type="hidden" name="SerPropString">
<input type="hidden" name="SerKeyString">
<input type="hidden" name="LogoffMode">
<input type="hidden" name="Autoclose">
<input type="hidden" name="LogTerm">
</FORM>Thanks!Hi Kishor,
My code in Httpunit testClass looks like this:
URL serverUrl = new URL(url);
WebConversation conversation = new WebConversation();
WebRequest request = new GetMethodWebRequest(serverUrl,"");
WebResponse response = conversation.getResponse(request);
assertNotNull("response of url: " + url, response);
WebForm[] logonform = response.getForms();
System.out.println("Get no of forms-->"logonform.length".");
Here, I want to retrieve the number of forms in the page. I'm getting '0' as the output of "logonform.length" when trying on SAP EP server, whereas I used same html source to create a web page on local machine (windows xp sp 2)and tried to run on local server(IIS), the output is as expected i.e. 2.
If I try to use WebTable table = response.getTables()[0];
then the text associated with the table is shown as "iView is not compatible with your browser, operating system or device. Contact your system administrator"
My IE version is 6.0.
Is there some problem with the HttpUnit classed I'm using?
rgds,
avadh -
Doubt regarding facebook integration for windows phone 8.1 silverlight app?
Hi,
I am developing a windows phone 8.1 silverlight application . For my application I integrated the facebook login. For this facebook integration I used the login with facebook app method.
My doubt is after getting the app id from the dev center , I updated the appid at developers.facebook.com , wmmanifest.xml (In extensions protocol (msft-appid without dashes)) . Or do I need to change the product id in the place holder also , I tried to
change the productid also but I am getting error like some signature is wrong try with different signature. I am confused how to do it .
Any help,
Thanks...
Suresh.MHi Suresh,
According to your description, I assume you want to complete facebook configuration in windows phone silverlight app. Please refer to the following link to see how.
http://facebooksdk.net/docs/phone/config/.
You can find code sample from
https://github.com/facebook-csharp-sdk/facebook-winclient-sdk/tree/master/Samples.
Facebook API is third-party library and it is our of our support range. You can post questions on here.
https://github.com/facebook-csharp-sdk/facebook-winclient-sdk/issues.
Regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click HERE to participate
the survey. -
Dear Gurus,
i have a doubt regarding use of infoset in BI.
An infoset consist of , on the left, a DSO containing line items loaded from R/3.
On the right is a master data attribute loaded data from a user defined datasource based on a transparent table in r/3.
This master data has a single Key. Its a numeric like serial number field.
The transaction data in the DSO also has this field as part of the transaction data field (non-key).
A Left Outer Join is made between the 2 using several fields joining together. However, the key field in the master data is not joined even though both sides has it. Both this field in each are not joined.
So, by theory of a left outer join, All data not found in the master data will still be selected via the infoset.
I wish to understand :
1. by a 'join' does it mean its not a union? I assume so. But based on the meaning of left outer join, it sounds to me like a union?
Correct me if i am wrong.
2. what is the effect of not joining the master data key field to the same field found in the data part of the transaction data?
best regards
Basshi,
point 1:
am i right to say
If all data on the left is picked, and some latest data in the master data is not found in the left, only all the left side data is displayed am i right? so, what is not in the right (master data attr) will not be selected by the infoset?
left outer join will be more clear with an example to you, suppose you are joining cube and master data to pick attribute value from master data. let us say the master data has below value.
master data attribute
100 ABC
102 XYZ
103 DEF
Now in cube you have data
cube field
100
101
105
106
the infoset wll be returning the value as shown below for different scenarios
left outer join: all values in cube.
field attribute
100 ABC
101 # (no value in master data)
105 # (no value in master data)
106 # (no value in master data)
Inner join: common records
field attribute
100 ABC
Right outer join
field attribute
100 ABC
102 XYZ
103 DEF
point 2:
am i right to say
its just slower performance and the rest being similar effect as joining the key field?
So, if i join the key field it will be faster and the result is the same as not joining the key field of the master data to the transaction data?
no the join determines the amount of data it will be returning as explained above, you should define the joining conditions based on your business logic, like in the above case if the two fields should have same value and are the comparing criteria then you should join those as it would help in retrieving faster results.regards,
Arvind. -
Hi All,
I want to know the functionality of the Key Field in the DSO.
I know based on the Key Fields(Primary Key) data is pulled to DSO, but please explain me the below scenario
E.g
I have 3 records in the Extractor( Generic) and i am pulling data to DSO - Full load.
Material Qty Date
100 20 1-Jan-2010
100 30 5-Jan-2010
100 10 10-Jan-2010
In DSO i have only one Key field called 0MAT_NM (Material Number), but i have 3 records in the Extractor , shown above.
Now my Question is
On what basis data will be pulled to DSO?
Whether latest date records will be pulled to DSO or let me know correct method? because i have got material no 100
but date and Qty is different (means one time it is taking Qty - 30 and date as 1st Jan 2010, other run it is taking differnet).
Please clear my doubt.
Regards,
Nithi.in your dso you can have one record per key. keyfigures will be in addition or overwrite option. if in "addition' the value will be the sum of all the values for a given key. in 'overwrite', you'll only keep the last record written to the dso; char are always in overwrite, so you'll keep the last record written to the dso
M. -
Doubts regarding db connection with encrypted password usage in sandbox
Hi All,
We have setup the db connection using configuration file. The configuration file contains db connection information including the encrypted password.
Below are my doubts:
1. If we are going to import the ETL project in zip file directly into the sandbox can we run the graphs directly or we need to check how the password which is encrypted in configuration file will be decoded.
2. Can we directly modify the configuration file for db connection like db connection,user name and password. Suppose I want the graphs to run in some other database which is not specified in configuartion fiel .Can I directly update that?
3.Is it possible to change the encrypted password in the configuration file in the sandbox. Is it that we need to create the project in Integrator Designer, change the password using the Integrator Designer, and then copy the encrypted password into the configuration file in sandbox, or the Endeca provides a functionality to allow user to directly change the password in the sandbox on the Integrator server.
Can someone please let me know their comments on above.
Thanks in Advance.
Regards,
Amritcan someone please help me on this issue
Maybe you are looking for
-
I just updated my MacBook Pro to 10.9.2 and now I have pixilated bands of color running along shaded and bright areas of my display screen and graphics. I can not explain it any better than that. How can I fix this problem or should I go back to 10.9
-
Image Viewer Pictures Don't Display
I've attempted to use Image Viewer in DW CS3. Flash element and pics all stored in same folder within the same site. I've updated the parameter item to list the pics(.jpg only) I want displayed. When I press the 'Play' button in DW or preview page in
-
Using K Means in a Calculation View
Hi Experts, Can you please help me with the below scenario. I am trying to use K-Means function to perform clustering on customer data. I have the below columns: Attributes: Customer ID, Home Ownership Status Measures: Customers Debt to Income Ratio,
-
Installation of 11.1.0.5.10 Beta Blows Away SQL PLUS In Other Home
I had a working 10g R2 client installed and working. Installed 11.1.0.5.10 Beta into a new home. Attempted to run install scripts and determined that SQLPLUS no longer works in the 10g R2 client home. Any ideas? Should I have installed 11.1.0..5.10 b
-
Hi! I'm creating plugin for the Photoshop. In my application there is a button to dynamically create panels. varnPnl:Window = new Window; nPnl.type= CSXSWindowType.PANEL; nPnl.x = 100; nPnl.y = 100; nPnl.width = 400; nPnl.height = 400; nPnl.title =