Jump to content

Virtual Dev Environment


Jon
 Share

Recommended Posts

There aren't a lot of people who use AutoIt to test their applications extensively. Noone has really picked up creating tests for these purposes. I guess someone is going to write them in time, but currently the level of knowledge in the area of testing is lower then in any of the other areas I suppose.

Thats true. One of the drawback with these kind of test is that it does not have the automatic script step success/failure log capability. So when I run the tests automatically and when one of the tests fail I have no exact idea on which exact step it failed. May be if an option to log the result of each single step executed by the interpretor is given then a major hurdle to overcome the resistance using it as Testing Tool will be overcome. Rest of the features are not directly required to be part of the core interpretor engine, and can be developed separately.

Maybe some day I'll file it as an Enhancement, but as said by Manadar AutoIt is not extensively used in this area, so implementing this feature might not have enough incentive by the developers.

Link to comment
Share on other sites

Maybe some day I'll file it as an Enhancement, but as said by Manadar AutoIt is not extensively used in this area, so implementing this feature might not have enough incentive by the developers.

As you are able to declare your own functions. You can write your own to do exactly what you want on a very basic level.

A UDF that adds these functions for almost any input/output operability available would be a good testing UDF. On top of that could be another UDF that utilises these functions to even further simplify the testing process. Example code included.

; ControlClick that adds basic error log functionality
Func _ControlClick($Title, $Text, $ControlID, $Button = Default, $Clicks = Default, $x = Default, $y = Default)
    Local $r = ControlClick($Title,$Text,$ControlID,$Button,$Clicks,$x,$y)
    If $r = 0 Then
       _DebugWriteLine("! ControlClick failed with parameters: " & $Title & ", " & $Text & ", " & $ControlID & ", " & $Button & ", " & $Clicks & ", " & $x & ", " & $y)
    EndIf
EndFunc

Func _DebugWriteLine($text)
   _DebugWrite($text & @CRLF)
EndFunc

Func _DebugWrite($text)
   ; Log here directly into the console, memory or file
   ConsoleWrite($text)
EndFunc

I understand what you are saying, though. The fact that such a thing is lacking means you have to spend a lot of time developing it yourself, which is not wanted since your job is testing: not developing.

Edited by Manadar
Link to comment
Share on other sites

  • 3 weeks later...
  • Administrators

Got to say I'm LOVING the virtual dev environment. I've had a couple of hardware problem that have trashed my disks and it's great that I can be up an running by just installing Vista + VM rather than spending 10 hours installing Visual Studio and SPs :mellow: And it lets me keep both the dev environment and the host much cleaner.

Link to comment
Share on other sites

I rebuild my machines a lot due to installing every bit of shiny new software I see and messing the thing up, replacing hardware for gaming, or just for a clearout. It gets real boring reinstalling all the dev tools I need (Visual Studio + Service packs takes hours).

So, I'm thinking of running all my dev inside a virtual machine. Anyone use this method and has any thoughts?

Jon, have you tried Returnil?

If you need to test software, these may interest you as well.

Sandboxie

Altiris

Edited by mrRevoked
Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet()
Link to comment
Share on other sites

  • 3 weeks later...

You're on the AutoIt forum and you can't see a solution for that? I use launcher scripts for things like Windows Update, VMware, et cetera. It goes through, starts the proper services, runs the program, waits until the program ends, stops the services and disables them.

Valik, a most excellent idea as you already know. Do you have any resources/utilities that you have at your wielding power that help in the knowledge of which items need which services? I would love to be able to run launcher scripts as you describe.

Thanks,

Jarvis

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

I don't use any of the services that VMware installs if that's what you are asking. I use a bridged network and have no need for any of the services to be running.

Edit: Oh, and as for Windows Update, the "Automatic Updates" service needs to be running and so does "Background Intelligent Transfer Service". So my script starts those two services, runs Windows Update and waits for IE to close. When IE closes, it stops the services. It also ensures the services are set to disabled when finished so that they won't secretly start up. Same holds true with the VMware services.

Edited by Valik
Link to comment
Share on other sites

I don't use any of the services that VMware installs if that's what you are asking. I use a bridged network and have no need for any of the services to be running.

Edit: Oh, and as for Windows Update, the "Automatic Updates" service needs to be running and so does "Background Intelligent Transfer Service". So my script starts those two services, runs Windows Update and waits for IE to close. When IE closes, it stops the services. It also ensures the services are set to disabled when finished so that they won't secretly start up. Same holds true with the VMware services.

Thanks for the info on VMWare. I mostly knew about Automatic Updates, but I didn't know you needed BITS to make it work. I was also talking about other applications and programs. I assume just some good googling and research would help with what other services need to be running..?

Thanks,

Jarvis

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

I usually just use trial and error. Turn all the services off and set them to manual start then run the program. See what starts up. That might eliminate some stuff right there. Then turn everything off and disable it. Start the program again and see what it bitches about. Slowly turn things on as it bitches or you notice missing things.

Link to comment
Share on other sites

I set up a Vista Ultimate VM guest with 1GB of RAM and 2 CPUs.

A full AutoIt x64 project rebuild takes 19secs on my physical machine, and 25 secs in the virtual. For a solution rebuild (that builds one project on each CPU at the same time) the physical was 24 secs and the VM was 29 secs. When I did an AutoIt speed test the results were identical between the physical/vm so it looks like the only "slower" part is disk access. But still, that's totally usable so I'm going to give it a trial. Not sure how different the results would be on my laptop. (My desktop has a ludicrous harddisk speed = 224MB/s :) )

Interestingly, the VM is Vista Ultimate and with 1GB of RAM allocated and 2 copies of Visual Studio 2008 open and building I still had 400MB free. Guess Vista isn't quite the memory hog we thought :)

Just a curiosity: Are you using Vmware or Virtual PC ?

Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator

VW Bug user

Pinheiral (Pinewood) city:

http://pt.wikipedia.org/wiki/Pinheiral

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...