Solved! Go to Solution.
Support said this is just speed within the api and can't say much more. They said it has gotten faster over time so maybe will get better in the future but for now there is not much one can do to speed it up.
We are going to move highs speed routines out of test complete for now as it seems like the better plan.
Yes, you are right. Unfortunately Python scripts work slower than JS or VB (within TestComplete). However it became much faster from version 11 to 12. And I hope this trend will not be broken.
At the same time I can excuse some lack of speed during the run-time, because with Python I have a very powerful tool during test development.
Attached is the script(had to make txt to attach) that I am using, just need to set the print to be log in TC.
the output from TC is 360 and 858.
Run in python shell the output is 1 and 1.
This is shown in the second attachment image
I will make a support ticket as this is using straight python nothing TC, it seems crazy that it is that much slower!
This came up because it takes a really long time to run tests and the developers were asking me why.
Don't forget that TestComplete needs a time to launch its own Python interpreter.
In the case with the shell the interpreter is already launched.
Good point I think I accounted for that by having the timer only around the action not the entire function. Maybe python time.time does something I don't expect.
I believe I am ignoring the 2-3 seconds it takes before the test even starts. I consider that time acceptable but iteration on an array to be almost 1 second seems pretty slow.
def test_timing():
print("starting")
start_num = time.time()
numbers = create_permuted_ints(100)
made_num = time.time()
for i in range(50):
for j in range(100):
numbers[j] = (2 * numbers[j]) % 10000
end_num = time.time()
dt6 = int((made_num - start_num) * 1000)
dt7 = int((end_num - start_num) * 1000)
print(dt6)
print(dt7)
print("done")
Support said this is just speed within the api and can't say much more. They said it has gotten faster over time so maybe will get better in the future but for now there is not much one can do to speed it up.
We are going to move highs speed routines out of test complete for now as it seems like the better plan.
To add to this...you can certainly write a .NET DLL to do the heavy lifting (c# or whatever) and call its public methods from TestComplete (via CLR Bridge).
Subject | Author | Latest Post |
---|---|---|