Quantcast
Channel: New board topics in SmartBear Community
Viewing all 20990 articles
Browse latest View live

Project Variable

$
0
0

Hi Team,

i am trying to Create a object at run time and pass the same object for all other script.

for example,

in Method1 - i have created an excel object(Excel.Applilcation)

in Method2 - i want to access the object which is created in Method1 without creating the object again.

 

is it possible to store the created object in project variables and access them?

 

please help me out.

 

Kind Regards,

Krishna


How can I export a soapUI project with endpoints included?

$
0
0

I have exported my REST service to a WADL file but when I import it into another project the endpoint is missing on every request. I tried exporting as a swagger file but that doesnt fix it, I added the host: line to my json file but now all my endpoints are http://${#Project#url} but I don't want the http.

 

Is there a line I can add to the swagger file so that when I import it all my endpoints are ${#Project#url}?

Focus on window not visible on screen

$
0
0

Hello,

 

I'm testing an application (delphi) and every time I press F12, I get a new window which helps me navigate in the application (note that both the application and the window are part of the same process, which is why minimizing does not show the window). My issue is that when it is done enough times, the window appears behind the application. From what the devs told me, I have to change the window Z order to make it visible on screen.  

 

I have tried multiple things, but the object always says visible = true, while visibleOnScreen = false. Any idea how can I change the z order of application windows or even better, make my window visible again ?

Can not get Properties to work with MQ connection of AMQP plugin

$
0
0

Hi SmartBear,

 

ReadyAPI v2.8 Pro.

 

We have not succeed in getting Properties to work with AMQP plugin MQ configuration.

 

The issue we see is with Properties:

  1. Cannot get project properties to work with AMQP plugin connection configuration. We create a project property called “ourProperty” and inserted ${#Project#ourProperty} as Host value in AMQP plugin connection configuration. When running AMQP step we get message “Unable to declare exchange due to the following error: Unable to create AMQP connection due to the following error: ${#Project#ourProperty } ${#Project#ourProperty}”.

 

Could you please point to an example of Properties that work with plugin AMQP MQ connection configuration?

 

Regards
Keld

How to declare variable with project property value as public?

$
0
0

Hi,

i have a project property like:

property name: ftime

value: ${=def now = new Date();now.format("yyyy-MM-dd-HH-mm-ss")}

 

i would llike to append ftime in a filename.

so if i get the property inside my try catch block it works.

If it's outside it doesn't.

so how should we declare the variable.

i tried with static 

 

static def ftime = testRunner.testCase.testSuite.project.getPropertyValue("ftime")
try{
def fileName = 'C:\\temp\\myfile-'+ftimeime+'.txt'
}catch
(Exception e){
log.info "Error"+e
}

 

 

Thank you

Unable to create a user session - Error in Jenkins

$
0
0

I am trying to run Test Complete projects as a Freestyle Project on Windows server using Jenkins that is installed on the same sever.

Getting below Jenkins error –

 

Console Output

Started by user Shehnaz Patanwala

Running as SYSTEM

Building in workspace C:\Program Files (x86)\Jenkins\workspace\Test Complete

 

[TestComplete] The test execution started (PITA_Internal/C:\Users\Public\Install\pita-ui-automation-projects\PITA_Internal\A-Account_Reset_Project\A-Account_Reset_Project.mds).

[TestComplete] Found TestComplete/TestExecute installations:

        Type: TE, Version: 14.10.1042.11, Path: "C:\Program Files (x86)\SmartBear\TestExecute 14\x64\bin\TestExecute.exe"

[TestComplete] Selected TestComplete/TestExecute installation:

        Type: TE, Version: 14.10.1042.11, Path: "C:\Program Files (x86)\SmartBear\TestExecute 14\x64\bin\TestExecute.exe"

[TestComplete] Launching the test runner.

$ '"C:\Program Files (x86)\SmartBear\TestExecute 14\bin\TestCompleteService14.exe"' //LogonAndExecute //lDomain: "" //lName: "" //lPassword: ******** //lTimeout: "-1" //lUseActiveSession: "true" //lCommandLine: '""C:\Program Files (x86)\SmartBear\TestExecute 14\x64\bin\TestExecute.exe" C:\Users\Public\Install\pita-ui-automation-projects\PITA_Internal\PITA_Internal.pjs /run /SilentMode /ForceConversion /ns /exit "/ExportLog:C:\Program Files (x86)\Jenkins\workspace\Test Complete\1571766356292.tclogx" "/ExportLog:C:\Program Files (x86)\Jenkins\workspace\Test Complete\1571766356292.htmlx" "/ErrorLog:C:\Program Files (x86)\Jenkins\workspace\Test Complete\1571766356292.txt" /project:C:\Users\Public\Install\pita-ui-automation-projects\PITA_Internal\A-Account_Reset_Project\A-Account_Reset_Project.mds /DoNotShowLog /JenkinsTCPluginVersion:2.3"'

[TestComplete] Test runner exit code: -10 (Unable to create a user session).

[TestComplete] [WARNING] Unable to find the log file "1571766356292.tclogx".

[TestComplete] [WARNING] Unable to find the log file "1571766356292.htmlx".

[TestComplete] [WARNING] Errors occurred during the test execution.

[TestComplete] Marking the build as UNSTABLE.

[TestComplete] [WARNING] Unable to publish test results (xml data is empty).

[TestComplete] The test execution finished (PITA_Internal/C:\Users\Public\Install\pita-ui-automation-projects\PITA_Internal\A-Account_Reset_Project\A-Account_Reset_Project.mds).

Build step 'TestComplete Test' changed build result to UNSTABLE

Finished: UNSTABLE

 

 

Looks like it’s failing because of not creating a User Session. I have configured my workstation accordingly. Only thing that's missing in Jenkin step is creating a node and cofiguring Jenkins slave agent runs as a service. 

Is this a required step to run freestyle job on the server locally?

Data driven tests reporting

$
0
0

I have written data-driven tests (excel file data source) with one SOAPUI test case, This test case loops through each excel row (which is a test case) iteratively and executes the test steps. However, when I look at the report it shows one test case was executed with 'n' number of test steps. 

For example:

My SOAP-UI test has 4 test steps.

Test Step 1 - Groovy Script

Test Step 2 - POST

Test Step 3 - GET (This step has multiple assertions on Response) 

Test Step 4 - DELETE

 

Say, My excel data source has 3 test cases, say (testcase.xlsx) file looks like this.

TestCase                     Parm1       Parm2

This is Test Case 1      P1-A         P2-A

This is Test Case 2      P1-B         P2-B

This is Test Case 3      P1-C         P2-C

 

and as my SOAP-UI Test is looping and executing these tests... I want my report to look like this...

 

Test Case 1 

test step 1 was executed - Passed - in ##ms

test step 2 was executed - Passed - in ##ms

test step 3 was executed - Passed - in ##ms

                Assertion 1 - Passed

                Assertion 2 - Passed

test step 4 was executed - Passed - in ##ms

 

Test Case 2 

test step 1 was executed - Passed - in ##ms

test step 2 was executed - Passed - in ##ms

test step 3 was executed - Passed - in ##ms

                Assertion 1 - Passed

                Assertion 2 - Passed

test step 4 was executed - Passed - in ##ms

 

Test Case 3

test step 1 was executed - Passed - in ##ms

test step 2 was executed - Passed - in ##ms

test step 3 was executed - Passed - in ##ms

                Assertion 1 - Passed

                Assertion 2 - Passed

test step 4 was executed - Passed - in ##ms

 

How can I get report output for data-driven tests?

 

Your help is much appreciated. 

 

Thanks

Assert a date in format (e.g. MM-DD-CCYY) = date in a format (e.g. CCYY-MM-DDTHH24:MI:SSZ)

$
0
0

Hi,

 

I have a PATCH REST request (json type payload) which contains a requiredByDate attribute with a date value with format MM-DD-CCYY

 

The follow up GET REST json response contains the requiredByDate attribute, but the value is transformed from MM-DD-CCYY to CCYY-MM-DDTHH24:MISmiley FrustratedS format.

 

I need to verify the date is correct with the new date format, but  I've no idea how to do this - I'm guessing a small script assertion might do the job - but I really have no idea how to proceed - although i did have a go....

 

e.g. my example PATCH's payload is as follows:

{"requiredByDate" : "07-29-2019",
"certifierId" : "123456"
}

my example GET's response payload is as follows:

{
"certifierdecision" : 814250000,
"certifierfullname" : "Robert Smith",
"certifierid" : "123456",
"reasonforrejecting" : null,
"statuscode" : 814250005,
"reasonnotes" : null,"requiredByDate" : "2019-07-29T00:00:00Z",
"dateofinspection" : "2019-10-15T00:00:00Z",
"certificateitemid" : "65f73d0f-fdef-e911-a813-000d3a4aa8a9"
}


I tried putting a script assertion together against the GET request (after saving the PATCH request's date in a Properties step) knowing I wouldnt get absolutely right - but I wanted to give it a go anyway and this is what I got:

def USdate = context.expand('${Properties#requiredByDate}')
log.info(USdate)
def date = Date.parse("MM-dd-yyyy",USdate)
def UKdate = date.format("yyyy-MM-dd'T'HH:mm:ss'Z'")
log.info(UKdate)

assert USdate == UKdate

Obviously the assertion fails - because I'm saying 07-29-2019 is the same as '2019-07-29T00:00:00'

the results of the logging in the snippet is as follows:

Tue Oct 22 20:01:58 BST 2019: INFO: 07-29-2019
Tue Oct 22 20:01:58 BST 2019: INFO: 2019-07-29T00:00:00Z

Would anyone know how I can assert a date in one format (e.g. MM-DD-CCYY) is equivalent to the date in a different format (e.g. CCYY-MM-DDTHH24:MISmiley FrustratedSZ)?

 

I hope I've been clear in my request

 

Thanks to all!

 

rich

 


Keyword Tests and Date Functions/Values

$
0
0

I'm trying to modify the Value of a Property Checkpoint in a Keyword Test so that it will contain a string of text that remains constant concatenated with a string variable containing the current date in "yyyy\mm\dd" format (yes, I meant to use back slashes). I can create the variable name and I can insert the variable name into the value of the Property Checkpoint. I've tested this by setting the variable name to a hardcoded string value of today's date (see attached image) and it works. But, of course, it won't work tomorrow. I can't seem to figure out how to make that "Set Variable Value" assignment with a date function that results in today's date (IOW, replace "2019/10/22" in the image with something such as "Format(Now(),"yyyy\mm\dd"). Is what I'm describing possible?

while recording a keyword test in Mapped objects i see that three different browsers are created

$
0
0

hi 

 

i have intially recorded in a environment A and i see that the Mapped objects had created a hierarchy of Sys -> Browser.

i had set the URL as Project variable and was switching to see if the test cases recorded were getting executed successfully in Environment B.

 

but some Text Properties were not getting identified in any environemnts so i tried to recapture the objects in Environment A, but i see that now the mapped objects are getting created under Sys -> Broswer2.

 

Can someone help me with where or what i am doing wrong.

 

 

testrunner.bat

$
0
0

testrunner.bar runs fine from cmdline, but the response results of the requests are missing. I get only "Receiving response: HTTP/1.1 200 OK" and I expect the response content too. Any idea why the response content is missing?

Not able to execute test cases in test suite

$
0
0

Hello !

 

I have an issue regarding running multiple tests in a suite. When I try to execute entire test suite it executes only 7 test cases (there are total 39 testcases). After executing 7 test cases it stops execution and gives the result.

 

Test complete version: 14.20.2175.7 x64

Android

iOS

Angular Material 8 not recognized by Test Complete

$
0
0

My application uses angular with material, It's not possible by test complete to identify material objects details from DOM. Any idea when the possible support expected if at all.


Where to look for knowledge about getting data from OpenAPI via Swagger?

$
0
0

hello!

I'm not pro and not yet really good at looking for knowledge. I use python mainly as a hobby, but sometimes I use it to speed up my professional tasks (short scripts). Our tax authorities published API using Swagger and I'd like to get datae from this API so I can process it with python. Where I can find this part of Swagger manual/tutorial? Thanks a lot for your patience!

Weird behavior - object spy not seeing browser or DOM

$
0
0

This issue happens intermittently. TestComplete stops recognizing the DOM or even the browser. This is something that I have seen intermittently before but have not had the time to solve. I reboot and it seems to work. It FEELS like a connection to the license server is not finding the web license. BUt that is weird since it is the only license I have.

 

Has anyone seen this? 

Swagger 3 does not respect @JsonView() for derived classes

$
0
0

For example I have following data stricture:

class mainclass{

@JsonView({VIEW1.class, VIEW2.class})
private Animal someField;
}

class Animal {

}


class Cat extends Animal {

}

class Dog extends Animal {

}

class Tiger extends Cat {

}

class Wolf extends Dog {

}


And I defined 2 APIs that return mainclass: one API has @JsonView(VIEW1.class) and another one has @JsonView(VIEW2.class)

Each class in hierarchy has fields that must be displayed in VIEW1 only and fields for VIEW2 only.

Expected: Animal_VIEW1, Animal_VIEW2, Cat_VIEW1, Cat_VIEW2 etc.
Instead I get Cat, Tiger e t c with all fields without respect to view (on my mind they are introspected without view, so all fields are included)

How to fix this?

Generate Documentation for API output has minor (but important) HTML discrepancy

$
0
0

I am screen scraping HTML from the report created by "Generate Documentation".  I am pulling the outer HTML for the <li> tag in the report for each entry point; the <li> tags have a class attribute of "operation"...except for the last entry point on the report.  This makes it impossible to find the last entry point's doco as the <li> is not included in VBA getElementsByClassName("operation").  Example from inspect of the report (last highlighted <li> is missing "class=operation":

 

Annotation 2019-10-23 102648.jpg

"java: Illegal char at index 7: ../lib/*.jar" when maven project JDK updated to 11(or)13 from 8

$
0
0

Im using below dependacy to run soapUI tests from java class 

<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui</artifactId>
<version>5.4.0</version>

 it is working fine when project JDK is 8 when i upgrade it to 11 or 13 compilation failing with error "Error:java: Illegal char <*> at index 7: ../lib/*.jar"

Mvn version 3.6.1

Java version: 13.0.1

 

Viewing all 20990 articles
Browse latest View live