Questions tagged [simulate]

For issues relating to simulating a system, action, function, or behavior.

Simulation is an attempt to model a real-life or hypothetical situation so that it can be studied to see how the system works. By changing variables in the simulation, predictions may be made about the behaviour of the system. It is a tool to virtually investigate the behaviour of the system under study.

459 questions
249
votes
16 answers

Network tools that simulate slow network connection

I would like to visually evaluate web pages response time for several Internet connections types (DSL, Cable, T1, dial-up etc.) while my browser and web server are on the same LAN or even on the same machine. Are there any simple network tools or…
MaxK
  • 3,371
  • 4
  • 18
  • 15
92
votes
3 answers

How to use curl to get a GET request exactly same as using Chrome?

I have a web api http://something.com/api and I want to use GET to get the response body. This is my command: curl "http://something.com/api" Of course, it fails and gives an error message. When I use Chrome and input the above url, everythings…
wdetac
  • 2,142
  • 2
  • 16
  • 37
77
votes
8 answers

Simulate a click on 'a' element using javascript/jquery

I am trying to simulate a click on on an element. HTML for the same is as follows
user2373137
  • 806
  • 1
  • 8
  • 10
49
votes
1 answer

Play audio as microphone input

I am to test voice recognition programs. Some which I have access to the code and others where I don't. Sadly my (beautiful) voice is not perfect, so when I am reading a text it sounds slightly different each time. Which makes the testing difficult…
Mr. Java Wolf
  • 1,293
  • 2
  • 13
  • 28
37
votes
2 answers

Simulate Python keypresses for controlling a game

I'm trying to control a game (my two test games are Half Life 2 and Minecraft) using my Kinect and Python. Everything works except for one thing. The game will respond to simulated mouse events and simulated mouse movement (mouse events are done via…
user573949
  • 700
  • 2
  • 9
  • 16
34
votes
5 answers

Python simulate keydown

After searching for several hours i´m wondering if its possible to simulate a keydown press on the keyboard. For example I want my program to hold the x key down for five seconds so when I run it in notepad it would look like to see something like…
inControl
  • 1,875
  • 3
  • 18
  • 33
30
votes
4 answers

Simulate pressing tab key with jQuery

I have some textboxes on a .net-page and want to achieve the following with jQuery: if the user presses return, the program should behave "as if" he had used the tab key, thus, selecting the next element. I tried the following code (and some…
AGuyCalledGerald
  • 7,117
  • 16
  • 63
  • 110
27
votes
1 answer

Simulate Stripe Subscription Renewal Failure

I'm trying to test different Stripe Subscription failures. Specifically, what happens when an active subscription gets renewed when initially the card got accepted and the subscription is active, but the renewal payment gets declined, or the…
Charlie Fish
  • 13,172
  • 14
  • 64
  • 137
26
votes
3 answers

Android simulate key press

How can I programmatically simulate a key press on a Droid? I would like to mimic a manual key press (appearing on the droid that someone is pressing a key but it is being done programmatically). There are solutions out there involving…
calcrisk33
  • 305
  • 1
  • 3
  • 12
20
votes
4 answers

How can I simulate a "locked" file (one which has a write lock)

I am trying to debug a problem where users occasionally have locked files which they try to open. The code appears to have correct exception handling but users are still reporting seeing error messages. How can I simulate a locked file so that I…
Daisetsu
  • 4,416
  • 9
  • 46
  • 68
20
votes
5 answers

How to simulate DDOS/Slashdotting?

So, I'd like to get more experience working with high-traffic websites, but unfortunately the Internet is not beating down the doors to my blog. How can I simulate tens/hundreds of hits per second on my blog and test its performance? I'm hosting my…
Kevin Burke
  • 49,451
  • 66
  • 163
  • 280
20
votes
3 answers

Checkbox is not `checked` after simulate `change` with enzyme

I tried to use enzyme to simulate change event on a checkbox, and use chai-enzyme to assert if it's been checked. This is my Hello react component: import React from 'react'; class Hello extends React.Component { constructor(props) { …
Freewind
  • 177,284
  • 143
  • 381
  • 649
17
votes
3 answers

How to test what will happen when you publish an update to your app to the Market

I'm about to publish a new version of an app to the Market. In order to avoid any potential problems once its been pushed to the Market and people get notified of an update, I'd like to simulate that process on my phone using the .apk for the new…
charlest
  • 905
  • 2
  • 10
  • 20
16
votes
2 answers

Simulate fake location on real iOS device

I want to simulate fake location on my iPhone 5S device using specific longitude and latitude. Is there a way to do this in XCode. I tried using the simulate location feature by adding a GPX file in XCode but it's not working. Thank you in advance.
AWSSET
  • 277
  • 1
  • 3
  • 12
15
votes
8 answers

Testing WIA without having a scanner/camera device

I wrote a simple scanning code using WIA. I don't have a scanner device so I can't test it. Can I simulate a WIA device to testing it ?
iboware
  • 917
  • 1
  • 11
  • 23
1
2 3
30 31