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

Need help on rest service mocking based on input value.

$
0
0

Hi Team,

I have this rest URI : http://aporamam:8089/restservices/myidgenerate/v1/myids/getmyidData/1929

here 1929 is the userid within resource path. user id can change. I need to mock the rest response, in such a way that my mock response should work with any user id. I will be saving my mock response in a C:\users\mockpath\ directory. response will be saved in {userid}.json  in this directory. for example C:\users\mockpath\1929.json,  C:\users\mockpath\1930.json etc.

 

Please help to mock this. As of now i am able to mock with one id only and not like for different  input to give back different mock responses.


Import OpenAPI spec error

$
0
0

I'm trying to create a test from OpenAPI spec (v 3.0.0). The spec is valid based on swagger-cli validation. But SOAP UI Pro is not able to process it with the error: "Could not import a definition from the specified file". How to understand what is the problem, is there any error log?

Validate assertion with XPath field null

$
0
0

Hi all.

I am new with soap so please bear with me.

in the pro-version I created and assetion to match  "content" from a Datasource.

It match 100% if there are any details in the field. but when the api returns nothing "No phone number exist" then my test fails.

 

When I compare my results the datasource contains "Null" and the API returns Blank. which fails my assertion when it reads that line.

What regex can I write to ignore it when it is "blank"/"Empty" ?

Please see my screenshot :

The expath expression is as follow:

declare namespace typ='http://wowweb.miway.co.za/types/';
//typ:getLeadsResponseElement[1]/typ:result[1]/typ:leads[1]/typ:array[1]/typ:contactNumber[1]/text()

 

 Expected results:

${DataSource#PHONE_NO}

 

Xpath1.jpg

 

The window size is (0, 0)

$
0
0

I am new to the testcomplete environment and having some basic issues which I cant find on the internet or on the smartbear website.

If Can you please help me with some of my queries it will be great.

 

Untitled.pngUntitled1.pngTo describe the problem: I have two dropdowns on my page with no ID. It works fine normally but when I do a test run from TestComplete what it does is create a panel and note the cursor position on that panel with x and y axis. Now this panel gives me ambiguous error which I handled through script but if it cant get the control how m I goin to work data driven test through an excel sheet also is there any other way to solve this issue?

 

Regards,

M.Shafay Shiraz

How to write test result to excel file

$
0
0

I need to write the test result (Pass / Fail) to my test data file.

In my test data file, every 4 rows is one request, so I need to write one test result every 4 rows.

That means I need to know which row to wirte the test result.

There are 2 ways to do this as I know so far:

1. use POI to write the excel file, but I get error CTExtensionList. I don't find a way to fix it yet

2. use datasink context pointer. I don't know if SoapUI has this function or not. Can we write mutiple rows to output excel file (DataSink) in one groovy script step? I mean if we can write one row of Excel file, then move to next row in one step?

 

Thanks

OAS 3 and JDK 1.8

$
0
0

I have an integration of Swagger 2 annotations (code annotated with swagger annotations) with JDK 1.7 working. However I want to move to OAS 3 as it offeres a richer set of annoations. Due to circumstances beyond my control, my project cannot migrate from JDK 1.7 to JDK 1.8. OAS 3.0 is using JDK 1.8, and at run-time I get the version 52 issue. Is there a way around this issue?

 

Thanks

Integrating Collaborator with JIRA

Message "Field is required" appears during Test Run

$
0
0

Dear Friends!

 

I am facing the issue during test run of the web application. When save button is pressed, the "field required validator" gets applied on the two fields (text boxes) despite that the values in these fields are already available. Please see the attached snap "02 - Test Run - Field Required Issue Faced".

 

However, we do not face as such issue during test recording and data gets saved successfully. Please see the attached snap "01- Test Recording - No Issue Faced"

 

Anyone can help me that why does it happen? Please note that we use angular JS and devex controls in the application and we are using browser Internet Explorer Version 11 (we have already applied recommended browser related changes as descripbed by smarbear and further, we use trial version of the testcomplete).

 

 

Best Regards,

Muhammad Shamsher Khan


SOAPUI free version for Windows server 2016

$
0
0

Hi,

Could you please let me know which version of soapui open source supports Windows server 2016

Automation Test flow execution between desktop, mobile, web and soap in TC

$
0
0

Hi,

 

I am looking into doing some end to end verifications. This means getting some test up, where I need to get some scenarios tuning whitch will function with desktop, mobile, web and soap.

 

Do any one have experience with this? 

And how to handle the initial setup with the test distribution? 

I know these things are hard to manage, due to system complexity. But this is not what I asking :-)

 

Execution Stats TearDown Script By Lucian

$
0
0

Hey!

 

TI am using a script developed to record my execution stats.   Its a teardown script I've stuck at project level at moment and is as follows:

 

It's fantastic - does almost everything I want.  Currently it iteratively runs through each of the testsuites and returns the pass/fail numbers for the tests in each testsuite in the project.  This is great - but on top of the current stats returned I need it to return a total executed, total PASS and total FAIL for the project after all the other stats have been returned, rather than at testsuite level which is what it's doing at the moment. 

 

I think I could probably do that if the script wasn't iterative - if the script parked the values into variables that I could add up at the end - I think I could do that - but I just dont know where to start to alter the existing to give me those extra project level stats - or maybe it is easy and I'm just being dumb!?!? Smiley Wink

 

// Define variables for holding test suites, test cases and test steps
def testSuites
def testCases
def passedTestCases = 0
def failedTestCases = 0

// Get the list of test suites
testSuites = runner.getResults() 

// Iterate through each test suite
testSuites.each() {
	log.info "----------------------------------------"
	log.info "The " + "'" + it.getTestSuite().getName() +"'" + " test suite has " + it.getStatus() + "ED."
	log.info "Test case execution results as follows..."

	// Get all the test cases and iterate through them
	testCases = it.getResults()
	testCases.each() {
		log.info "Test case " + "'" + it.getTestCase().getName() + "' " + it.getStatus() + "ED."
		if ( it.getStatus().toString().equals("PASS") ) {
			passedTestCases++
		} else {
			failedTestCases++
		}
	}

	log.info " Number of PASSES = " + passedTestCases.toString() + " Number of FAILS = " + failedTestCases.toString() + "."
	passedTestCases = 0
	failedTestCases = 0
}

 

 

If anyone could give me a steer - I'd appreciate it - I just don't know where to start to alter the script accordingly.

 

As always - props to the originator of the work (Lucian) - I can't take credit! Smiley Happy

 

nice one

 

richie

how to iterate through worksheets while using get ActiveXObject("Excel.Aplication")

$
0
0

I am using Javascript for my project. I am picking up test data from excel sheet via getActiveXObject. Earler I was just picking data from one sheet but now I am required to pick data correspoding to each testcase from different worksheets.I have written code to get row count , when my Workbook had just one worksheet ,it worked fine. I am not able to get worksheet object and workshet count . Below is my code:

 

function get_valid_row_count (ExcelPath)
{
var objExcel = getActiveXObject("Excel.Application");
//objExcel.Visible = true;
var aobjWorkbook = objExcel.Workbooks.Open(ExcelPath);
(what method sould I use here to get refernce to  worksheets so that I can iterate through them and go to each worksheet by using their name)
var iUsedRowCount = aobjWorkbook.ActiveSheet.UsedRange.Rows.Count;
var ValidRowCnt = (iUsedRowCount-1);
return ValidRowCnt;
}

How can I get worksheet objcet so that I can pass it in place of 'Activesheet'. Also I am not able to check what methods are avilable for the workbook object..whatever I try I get error  that this is not a function.

 

 

Testcomplete still waits for timeout of click operation on JButton after it was clicked

$
0
0

This is a really weird behaviour on very common javax.swing.JButton object, it is about a single click event of JButton.

After JButton was clicked, it does not go to next action but still waits until wait-timeout of this click event ends. i could not figure it out yet.

i am user of Testcomplete 12.50

Can you not add your own custom script to a Toolbar button?

$
0
0

I've read all the documentation, and is it correct to say that the customization of the toolbar itself, is only to mix and match existing tools from other tool bars?  I've written code in .js to auto-generate/update an excel file that runs our data driven tests.  It basically reads all the TestCases we have, and strips out the individual test cases and populates the excel file, along with where each test excel data corresponding path it maps to.  This made more sense to initiate it on the fly, once the number of tests started growing, and forgetting to update the file everytime we completed a new test case.

 

If there's no way to do this, how would you say, is the best way to initiate this process?

Launch composite project with testrunner

$
0
0

Hello,

 

I try to launch testrunner.bat from jenkins on a composite project . The command line looks like that :

testrunner.bat "C:\Application\jenkins\workspace\A1002_GPS\TNR_SOAP_UI\GPS_test_services\Prlm16\Prlm16_GPS_test_servicesDev\GPSTestsWorkflowService-readyapi-project" -f C:\Application\Configuration\DGC-RC\build\16.2\731\TEST_SOAP_UI -EDEV_MUT "-TTestCase SOCLE" -r -I -j -l wdmmi393:1099 

Unfortunately it is not able to find the environment or tag that i defined :

15:13:10,693 WARN  [WsdlProject] Failed to find the "DEV_MUT" environment. The default environment will be used.
15:13:10,695 INFO  [license] ReadyAPI 2.5.0 shutting down
15:13:11,153 ERROR [SoapUIProTestCaseRunner] java.lang.Exception: The tag "SOCLE" was not found.
15:13:11,154 ERROR [SoapUI] An error occurred [The tag "SOCLE" was not found.], see error log for details
15:13:11,155 ERROR [errorlog] java.lang.Exception: The tag "SOCLE" was not found.
java.lang.Exception: The tag "SOCLE" was not found.
	at com.smartbear.ready.cmd.runner.SoapUITestCaseRunner.a(SoapUITestCaseRunner.java:531) ~[ready-api-runners-2.5.0.jar:?]
	at com.smartbear.ready.cmd.runner.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:394) ~[ready-api-runners-2.5.0.jar:?]
	at com.smartbear.ready.cmd.runner.pro.SoapUIProTestCaseRunner.runRunner(SoapUIProTestCaseRunner.java:102) ~[ready-api-runners-2.5.0.jar:?]
	at com.smartbear.ready.cmd.runner.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:292) ~[ready-api-runners-2.5.0.jar:?]
	at com.smartbear.ready.cmd.runner.AbstractSoapUIRunner.runFromCommandLine(AbstractSoapUIRunner.java:173) [ready-api-runners-2.5.0.jar:?]
	at com.smartbear.ready.cmd.runner.pro.SoapUIProTestCaseRunner.init(SoapUIProTestCaseRunner.java:86) [ready-api-runners-2.5.0.jar:?]
	at com.smartbear.ready.cmd.runner.pro.SoapUIProTestCaseRunner.main(SoapUIProTestCaseRunner.java:82) [ready-api-runners-2.5.0.jar:?]
java.lang.Exception: The tag "SOCLE" was not found.
	at com.smartbear.ready.cmd.runner.SoapUITestCaseRunner.a(SoapUITestCaseRunner.java:531)
	at com.smartbear.ready.cmd.runner.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:394)
	at com.smartbear.ready.cmd.runner.pro.SoapUIProTestCaseRunner.runRunner(SoapUIProTestCaseRunner.java:102)
	at com.smartbear.ready.cmd.runner.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:292)
	at com.smartbear.ready.cmd.runner.AbstractSoapUIRunner.runFromCommandLine(AbstractSoapUIRunner.java:173)
	at com.smartbear.ready.cmd.runner.pro.SoapUIProTestCaseRunner.init(SoapUIProTestCaseRunner.java:86)
	at com.smartbear.ready.cmd.runner.pro.SoapUIProTestCaseRunner.main(SoapUIProTestCaseRunner.java:82)

 

Do you have any idea why ?


Accessing TestStepProperties

$
0
0

Hi All,

When we are creating testCase properties it's getting overwrite during load test. So I have created testStep properties where manupulating values during runtime for individual load. But I am not able to pass these filed in input of some request.

 

I have tried accessing using below parameter, but it did not work. Can anyone please help in this regards.

Capture.PNG

 

Thanks

Baharul Islam

Model Based Testing anyone?

$
0
0

Hi,

 

I am using model based testing for easing the increase of test coverage.

I am generating testscripts from "requirement" models, which are imported into the TC project, and then executed.

The models are represented in Graphml, and traversed by an external tool, which output are converted into scripts.

 

My interrest is, if anyone is using Model Based Testing other than me? and if so. Then how? Willing to share experience :-)

Unable to use ActiveX control in Testcomplete 12

$
0
0
We migrated from Testcomplete 10 to Testcomplete 12. We were using an ActiveX control called Modbus ActiveX control in Testcomplete 10 scripts but after migration this is not supported. When we add it in events and try to use the GetActivexObject method of the Control an error "Classid not registered is displayed"

This blocks a major part of our automation.

Get TestComplete log in QA Complete after automated test run

$
0
0

I am woroking through our first example of a test case in QAComplete referincing and running a TestComplete automated test. It looks lovely except that I cannot figure out how to get the TC log attached to the run for viewing in QAComplete. Help please!!! I don't find it in the otherwise really helpful docs.

Want to see whole Json response of API while running through Jenkins

$
0
0

When I do console output, I only see the request URL and Response status code in jenkins. Do I have to do anything more to see full Raw request and Raw response in Jenkins?

 

Currently, I'm getting. I need the full raw request and raw response.

 Sending request: POST xx/xxx/xxx HTTP/1.1
21:18:36,317 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Receiving response: HTTP/1.1 201 
21:18:36,317 DEBUG [HttpClientSupport$SoapUIHttpClient] Connection can be kept alive indefinitely
21:18:36,356 INFO  [SoapUITestCaseRunner] Assertion [Valid HTTP Status Codes] has status VALID
21:18:36,358 INFO  [SoapUITestCaseRunner] Assertion [Script Assertion] has status VALID

 

 

Viewing all 20073 articles
Browse latest View live