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

Groovy Script Test Step only execute once in a DataSource Loop test case

$
0
0

Hi,

I am new to Ready!API and created a test case with datasource loop. I've added a groovy script which checks one property of the response of an earlier step. If the property value is 'Inprogress' then it waits and excute the same step again. My problem is the groovy script only get run once.

Basically I want to wait and keep executing the 'avalability response' step till it's status property is no longer 'InProgress'. If there is a better way of doing it please let me know.

def response = context.expand( '${XXYYZZ')
if (response == "InProgress")
{
sleep(5000)
testRunner.runTestStepByName( "Availability Response")
}

Many Thanks


Creating a call to send compressed data?

how to check if sheet in excel driver exist or not

$
0
0

Hi, 

 

I want to check if Sheet1 exists or not. Sometimes 'Sheet1' is named as Error in our application, and hence is an actual error in export. Even though file is exported correctly. 

 

Attempt:

var excelDDT= DDT.ExcelDriver(ProjectSuite.Variables.PlanExportDirectory, "Sheet1", true);

      if(excelDDT.){
          Log.Message("excel DDT exists");
      }
      else{
          Log.Error("Exported file contains error");
      }

     while(!DDT.CurrentDriver.EOF()){
       //Test
       Log.message(DDT.CurrentDriver.Value(0)); 
      }

      // Close driver
      DDT.CloseDriver(DDT.CurrentDriver.Name); 

 

It throws Jscript error on first line because Sheet1 doesn't exist. 

 

Thanks in advance,

Shiva

 

New test step does not save correctly

$
0
0

I have been working on a new type of test step - RestTestRequestWithRetryStep, which extends RestTestRequestStep with some basic retry functionality. Everything works well in the client, I can add a new RestTestRequestWithRetryStep and also "add retries" to an existing RestTestRequestStep.

 

But when I try to save the test, or the entire project, ReadyAPI doesn't save the new steps correctly. Needless to say, when I load the saved project, the new steps are essentially gone. This is what's actually being saved - the new test step doesn't have an ID, nor does it have a config:

 

...</con:testStep>
<con:testStep type="RestTestRequestWithRetryStep" name="REST Request with Retry"/>
<con:testStep type="restrequest" name="Verify Group with Feature" id="4ac98a7d-b290-4aca-948f-06be471dc4f2"> ...

 

 

I hope that I'm missing something simple, can someone please help me? Here's some of my code:

 

@PluginTestStep(typeName = RestTestRequestWithRetryStep.REST_TEST_REQUEST_WITH_RETRY_STEP, name = "REST Request with Retry", description = "REST Test Request with Retry Step")
public class RestTestRequestWithRetryStep extends RestTestRequestStep {

	public static final String REST_TEST_REQUEST_WITH_RETRY_STEP = "RestTestRequestWithRetryStep";
	
	private int maxRetries;
	private int retryInterval;
	private final int DEFAULT_MAX_RETRIES = 3;
	private final int DEFAULT_RETRY_INTERVAL = 5;
	
	public RestTestRequestWithRetryStep(WsdlTestCase testCase, TestStepConfig config, boolean forLoadTest) throws ItemDeletedException {
		super(testCase, new RestRequestWithRetryStepFactory().createNewTestStep(testCase, config.getName()), forLoadTest);
		try {
			setMaxRetries(DEFAULT_MAX_RETRIES);
			setRetryInterval(DEFAULT_RETRY_INTERVAL);
		} catch (InvalidSettingException e) {
			e.printStackTrace();
			throw new RuntimeException(e);
		}
	}
    
	@Override
	public TestStepResult run(TestCaseRunner testRunner, TestCaseRunContext testRunContext) {
    	
		int retryCount = 0;
		TestStepResult stepResult = null;
		boolean tryAgain;
    	
		do {
			stepResult = super.run(testRunner, testRunContext);
			tryAgain = false;
			retryCount++;
			if (retryCount <= getMaxRetries() && stepResult.getStatus().equals(TestStepStatus.FAILED)) {
				tryAgain = true;
				try {
					Thread.sleep(getRetryInterval() * 1000);
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
			}
		} while (tryAgain);
		return stepResult;
	}
	@Override
	public void resetConfigOnMove(TestStepConfig config) {
		super.resetConfigOnMove(this.getConfig());
	}
public class RestRequestWithRetryStepFactory extends RestRequestStepFactory
{
	@Override
	public WsdlTestStep buildTestStep(WsdlTestCase testCase, TestStepConfig config, boolean forLoadTest) {
		try {
			return new RestTestRequestWithRetryStep(testCase, config, forLoadTest);
		} catch (ItemDeletedException e) {
			e.printStackTrace();
			throw new RuntimeException(e);
		}
	}

	@Override
	public boolean canCreate() {
		return true;
	}

	@Override
	public TestStepConfig createNewTestStep(WsdlTestCase testCase, String name) {
		WsdlTestStep step = testCase.getTestStepByName(name);
		if (step == null) {
			return super.createNewTestStep(testCase, name);
		} else {
			TestStepConfig origConfig = step.getConfig();
			RestRequestStepConfig origRestRequestStepConfig = (RestRequestStepConfig) origConfig.getConfig();
			
			RestRequestStepConfig newRestRequestStepConfig = RestRequestStepConfig.Factory.newInstance();
			newRestRequestStepConfig.setService(origRestRequestStepConfig.getService());
			newRestRequestStepConfig.setResourcePath(origRestRequestStepConfig.getResourcePath());
			newRestRequestStepConfig.setMethodName(origRestRequestStepConfig.getMethodName());
			newRestRequestStepConfig.addNewRestRequest().set(origRestRequestStepConfig.getRestRequest());
			TestStepConfig newConfig = TestStepConfig.Factory.newInstance();
			newConfig.setConfig(newRestRequestStepConfig);
			newConfig.setType(RestTestRequestWithRetryStep.REST_TEST_REQUEST_WITH_RETRY_STEP);
			
			testCase.removeTestStep(step);
			return newConfig;
		}
	}
}
@ActionConfiguration(actionGroup = ActionGroups.REST_TEST_REQUEST_ACTIONS)
public class RestTestRequestStepAddRetriesAction extends AbstractSoapUIAction<RestTestRequestStep> {

	public RestTestRequestStepAddRetriesAction() {
		super("Add Retries", "Action for adding retry functionality to a REST Request test step");
	}

	@Override
	public void perform(RestTestRequestStep step, Object o) {
		TestStepConfig newConfig = TestStepConfig.Factory.newInstance();
		newConfig.setType(RestTestRequestWithRetryStep.REST_TEST_REQUEST_WITH_RETRY_STEP);
		newConfig.setName(step.getName());
		
		WsdlTestCase parentTest = step.getTestCase();
		int stepIndex = parentTest.getIndexOfTestStep(step);
		parentTest.insertTestStep(newConfig, stepIndex);
	}
}

 

How can we set jdbc timeout in Ready API 1.4?

$
0
0

Can any body please help me in chaging the JDBC time out in Ready API 1.4?

Also in the jdbc time out ssertion step,i am not able to add timeout assertion.Please help.

Three Strangers

$
0
0

Once upon a time there were three strangers: Object Browser, Mapped Objects, and Name Mapping (Aliases). Each one had their own panel in TestComplete land but none knew of the other. The Object Browser was the oldest and wisest because he saw everything on a screen. Despite his knowledge and vision he was “old school” and never learned to refactor/rename or speak abstractly (spin*). He was long winded and spoke gibberish:

 

 

Sys.Browser("firefox").Page("http://localhost/CMWebTest/Go/?p=/CMWebTest/cribbin/cribbingridproperties").Panel("primaryWrapper").Section("primaryContent").Frame("t_CMWebTest_cribbin_cribbingridproperties_content").Section("actionWrapper").Section("actionContent").Panel(0).Table("splCribBin").Cell(0, 0).Panel("splCribBin_0_CC").Table("gridView_CRIB").Cell(0, 0).Panel(1).Table("gridView_CRIB_DXMainTable").Cell(1, 1)

 

Using this approach was highly fragile and broke when the object hierarchy changed (and they always do).

 

TestComplete land had a social program which attempted to help (Map objects automatically) but was unfriendly and somewhat dangerous - especially if ‘Use extended find when possible’ was enabled.

 

Automatic Mapping.JPG

 

The next oldest was Mapped Objects. He learned about objects while traveling down the Keyword Test highway and the ‘Map New Object’ button was used during object recognition while creating test steps. However, Name Mapping(s) are not generated and leaves a disconnect between Mapped Objects and Name Mapping (Aliases).

 

Map New Object.JPG

 

His approach wasn’t browser friendly (sys.browser v. Alias.Browser)

 

sys.browser.jpg

 

and left a gap between Mapped Objects and Aliases. He was somewhat convincing but had only his own self interest at heart. There was a social gathering in town where he would show town folk this ‘Map New Object’ button but didn’t tell them of it’s shortcomings.

 

He could map objects but many assumed this included Name Mapping and many were fooled. He later shared there was more which needed to be done to be useful (Manual Name Mapping). Had the townsfolk realized how tedious and pearlous this journey was they would have never listened to him had they known.

 

Manual Mapping.JPG

 

The youngest, fastest, and smartest was Name Mapping. He could refactor/rename at the speed of light and provided the most use of anyone in town. And he was browser friendly (Alias.Browser) and a little bit wild (*). His wildness provided great benefit and flexibility never before seen. The problem was there was only one place they could meet and the townsfolk were not told.

 

And then one day at a town gathering the Object Browser spoke out and said, “I may be the oldest but don’t forget I am also the wisest.” And then he proceeded to share his magic. He said, “If you map from me I’ll give you both Object Mapping and Name Mapping (unlike those younger whipper snappers). He said, “It is easy - let me show you how.”

 

"Before using the object in a test, map it using me", said the Object Browser ...

 

First, use the ‘Object Spy’ button to identify the object.

 

Spy.JPG

 

Then use the “Highlight Object in Object Tree” to easily and quickly find the object in the Object Browser.

 

sys.browser.jpg

 

And map from there by right-click on the desired object.

 

Object Browser.JPG

 

Object Browser said,“You will get both Object Mapping andName Mapping speaking to each other and the entire town will be in harmony” and the townspeople were in awe and elected him mayor.

Referring of user-forms

$
0
0

I have several projects for testing.
One project entirly consists of re-useble libraries
Wrote a user-form and event script in library project, which supposed to used in several projects.
But when you add those as unit reference to projects, only one instance will work fine.
Other will get error

 

Unable to execute the "OnShow" event of the "Root_0AA8315E_7F1E_44C7_9CC8_9A3C7AF4B163" object.
The "CurruntTest_OnShow" method cannot be found or it has an invalid number of parameters.

Think this is b'cos all instance of the form could reffer only one instance of event script
Any ideads?

DDT.CSVDriver is not working

$
0
0

Hi All,

 

I am using DDT.CSVDrive() for opening csv file. it will be work fine when, I pass file name (path) directly in DDT.CSVDrive() methods. but its given error when I am passing same path using dictionary object.

 

Dictionary object is return same path but without double quote("") so I have convert same into string and pass it (aqconvert.vartostr). but still its throwen error.

 

Could you please help. what is happening.

 

Thanks


How can I import external python packages like "numpy" etc. in Testcomplete?

$
0
0

Hi,

 

is there a way of making the python34 installation, which comes with Testcomplete, find e.g the "site-packages" of my system's python34 installation?

 

 

Parsing a string and counting characters.

$
0
0

String Example: type1=12345678901234567890111&type2=3.0.00&type3=1234567811

From reading the user guide it looks like I can use the aqString.ListSeparator to define the & as use the delimiter and then I could the aqString.GetLength to validate the length of the string.

I'd like to do this using a keyword test if possible also.

However what I would like to do is something like the following, 

Validate type1 is 23 characters long after the equals symbol 
Validate type2 is 6 characters long after the equals symbol
Validate type3 is 10 characters long after the equal symbol

My issue here is that I don't want to count the characters that make up the title, such as type3= would add 6 addational characters to my validation. Is there a way for me to work around this?

Thanks,

Running Windows Batch Files in Test Complete(VBscript)

$
0
0

I am trying to execute bat file through code instead of using "TESTED APPS" as below..

 

--------------

sAutoAppPath = "E:\AutomationDir\Applications\InDMSApp_QA\bin\start_dms.bat"

Call Sys.OleObject("WScript.Shell").Run(sAutoAppPath )

and

Call Win32API.WinExec(sAutoAppPath, SW_SHOW)

--------------------------------------------------------------

WHile executing the above code i am finding error "System cannot find the file specified"

 

Can anyone please suggest the solution to execute the Bat file through the code?

 

Thanks in Advance.. Smiley Happy

Kavan.. 

I am trying to add the User headers in SOAP UI (Not the JMS headers). How I can do this ?

Unable to run LoadUI v2.8.1 from command line (headless) on Linux

$
0
0

I'm unable to run LoadUI v2.8.1 from command line (headless) on Linux.

I'm running loadUI-cmd.sh, which already has -nofx and --nofx=true set in the script but when I run the script it looks for a X11 display and pops a X11 dialog window: 

JavaFX 2.1.0 is required to view this content but JavaFX. Get the JavaFX runtime from java.com/javafx and run the installer. Then restart the application.

 

I've removed the "-s" and "-r" arguments to disable report generation.

 

How can I completely disable this?

 

 

 

DevExpress, properties of TList property inaccessible

$
0
0

Hello.

 

First of all: we are a developer of a huge (over 3M lines of code) Delphi application, compiling it to a single exe is impossible.

We use Developer Express components and TestComplete.

 

Since we have migrated to Delphi XE7 and newest DevExpress components, our tests stopped working. Just some properties of DX controls are unavailable. Example: TcxImageComboBox.Properties.Items.Count.

 

Reason is that TcxImageComboBox.Properties.Items is TList<>, which is inside of rtl210.bpl. Non published properties of this class are unavailable in TestComplete. Ans, as I said before, compiling unit containing it with debug info is impossible.

 

I tried to write own plugin, but I just receive IDispatch when I try to send a control into it.

   TMyPluginRuntimeObject.DoSthWithControl(Control: OleVariant);

 

What can I do about it? Is there any way of geting control as a Delphi class? Or some way do get the debug info of standard Embarcadero classes?

 

P.S.

Same reason DevExpress extension supplied with TC in Object Spy is reporting:

wItemCount:

Error: Error
An error occurred.
Possible reasons:
1. The application stopped responding.
2. The application was compiled incorrectly (see the Open Applications topic in the help system).
3. An error occurred in TestComplete.

Technical information:
103 0x80020006 (Unknown name.) Count

Handling the 'Object Does Not Exist' Error (support resources and videos!)

$
0
0

TestComplete records using information about the objects you interact with and the actions you take.  When a test is being played back, TestComplete looks for those same object properties to know where to navigate on screen.  This same process is used for desktop, web, and mobile applications.  Sometimes these objects are generated dynamically, which means those object properties might not always be the same every time the test plays back.

 

If you're getting an "Object does not Exist" error on playback, it may be necessary to get into the NameMapping to change how TestComplete locates that object.  The article and the video links below go over ways to change the NameMapping for a particular object so it can be reliably identified.

 

Handling the 'Object Does Not Exist' Error

 

Short Videos

Editing properties of a control

Using the wildcard to deal with dynamic controls

Using the extended find feature to search for a control

 


Major AlertSite UXM Update

$
0
0

Greetings,

 

I wanted to let you know that we introduced some significant updates to AlertSite UXM last week.  Included in this update are changes to the core interface, the new monitor workflow, alerting enhancements, and much more.

 

We’re hosting a webinar on Wednesday, September 9th to walk through the changes in more details.  Please click this link to register:  https://attendee.gotowebinar.com/register/349450452982228737.

 

 

Key Interface Updates

 

  • The core user interface and menu structure has been modified quite a bit.  We’ve removed the left navigation panel and simplified the header, resulting in more available screen real estate.   

 

  • Everything ‘missing’ from the left navigation panel can be found in either the User or Settings dropdown control (the two icons on far right of the menu bar).

 

  • You’ll also notice the blue “+” button – this control launches a new slide out panel that serves as a starting point for creating new monitors, groups, and views.

 

There’s a lot more to this update, so I’ve included the release notes below to give you more information about the changes.

 

We hope you find the new functionality valuable.  If you have any questions or feedback about the release, please don’t hesitate to pass it along to your Customer Success Advisor or reach out to me directly.

 

 

08/27/2015

Release Notes

UXM User Interface Upgrade

  • New streamlined design increases usable screen real estate.
  • All navigation resides in a redesigned top navigation panel.
  • The left navigation panel has been removed from the interface.
  • All support, account administration, and user profile controls are grouped together in top navigation panel.

Alerting Enhancements

Alert Routing by Error Type

  • Route alerts to specific recipient groups based on the type of error.
  • Allows users to target certain types of problems to specialized support teams.

Step Level Performance Alerts

  • Users can now set performance alert thresholds for specific steps in addition to existing monitor-level performance alert functionality.
  • Allows users to get more insight into user experience impact and possible root cause of performance slowdowns.

New Alert Template Design

  • Alert template designs have been updated with a new design that focuses on the alert payload.

Improved New Monitor Creation Flow

  • New user friendly monitor creation and configuration interface.
  • All available web, API, Mobile, and infrastructure monitoring capabilities are surfaced in a user-centric workflow.

Perfecto Mobile Monitoring in AlertSite UXM

  • Perfecto Mobile monitors are now surfaced in AlertSite UXM.
  • Users may now view results, create, and configure Perfecto Mobile monitors.

Various bug fixes and performance enhancements

 

 

Thanks!

Defect: The "API Navigator" doesn't remember that you hid it, and pushes Properties pane off screen

$
0
0

In Ready! API 1.4, the new API Navigator always re-opens every time you open Ready! API, even if you closed it.

 

This pane should remember it's settings between sessions.

 

The API Navigator also always pushes the Properties pane all the way to the bottom of the screen, hiding its contents.  Even after you hide the API Navigator, the Properties pane doesn't expand back up to it's full height--as it should.  Every time I open Ready! API, I now have to close the API Navigator then drag the properties pane back up again.

python checkpoint

$
0
0

I am swapping my JS project over to python and i noticed an issue with creating a checkpoint.

 

These steps lead to a hung TestComplete 11:

 

Start a python project

Record script

Record a property checkpoint

Drag to the property you want

Let go of mouse

Wait

Nothing ever happens and you need to kill the process

 

Has anyone else come across this?

 

How to set SoapUI project properties via Maven command line

$
0
0

I have a few project properies in SoapUI project. I also have those project properties overridden in Maven pom.xml, for eg.

 

...

<projectProperties>

    <value>propname1=propvalue1</value>

    <value>propname2=propvalue2</value>

    ...

    <value>propname9=propvalue9</value>

</projectProperties>

 

When running from command line using maven, SoapUI property values are overridden by the ones in Maven pom.xml, as expected.

 

I need to run SoapUI from command line using Maven but need to use the properties specified in SoapUI project, not Maven. Is there any way to specify these properties in Maven command line? If not, is there any other solution?

 

Versions:

SoapUI Pro 5.1.2

maven-soapui-pro-plugin 4.5.1

 

I also found a related post (http://forum.soapui.org/viewtopic.php?t=20839) and tried to use the flag -Dsoapui.projectProperties but have not been successful. Since exact syntax is not specified in the post, I tried many variations For eg: -

-Dsoapui.projectProperties.propname1.value="propvalue1"

-Dsoapui.projectProperties.proname1="propvalue1"

Https in SoapUI is not working

$
0
0

Hi all,

 

The http request from a third party system is being captured in SoapUI. It works fine. However , when an end point is changed to https , I can't seem to get working.

 

FYI - The certificate was internally generated by system admin. Testing is carried out in SIT environment.

 

What i have tried so far.

 

1. Have added keystore file and password provided by system admin in the following location in SoapUI.

Files>>Preferences>>SSL settings

 

Attached file

 

Can anyone please help me out?

 

thanks

Vinoth

 

 

Viewing all 26529 articles
Browse latest View live