PowerTip: Finding 10 Largest Files

Can be usefull for PowerSlim tests. For instance, in the !|Query: PowerShell|…|

Re-Posted. You can find the original here.

You may need to find the largest files for possible clean-up when free space on a drive runs low. One way is to have PowerShell examine all file sizes, sort by file size descending, and then pick the 10 largest ones (the 10 first results):

Dir $home -recurse -ea SilentlyContinue | Sort-Object Length -Descending | Select-Object -first 10 | Select-Object FullName, Length, LastWriteTime

You should note that this may take some time to complete. Also, you will see  the ErrorAction setting, which hides error messages that may occur when the command hits sub-folders or files you have no access.

Fitnesse and Network address translation

I have long been using Fitnesse. It is great framework for the Acceptance Testing.
There are two approach available right now in the Fitnesse. One is the original FIT approach. And the new one – SLIM.
No questions, SLIM is the best way to move forward. Only one thing prevent me to sleeping quietly is the SLIM and NAT incompatible. While FIT works well with NAT.
I like to copy my ESXi labs (several Virtual Machines) to make it possible to start a huge ammount of Fitnesse tests in parallel.
I can do it easy with the Fitness + FIT + NAT + HostOnly VM. But it is not possible with the SLIM right now. Fitnesse should be able to connect to HostOnly VM in that case. But i have only one gateway (which has real IP address) on my ESXi host. ALl other VM have the 192.168.0.x addresses.
So we should find the way to make it possible to initiate a connection from the SLIM server side back to the Fitnesse server. What do you think? Is it possible?
Maybe !define SLIM_DIRECTION {callback}

HOWTO SETUP PowerSlim Step by Step

This instruction is depricated. Use https://vlasenko.org/2011/01/31/how-to-start-with-powerslim/ instead.

There is the setup package available from the powerSlim 0.2. It will install all you need (Fitnesse, IronPython, WaferSlim, PowerSlim) to the C:\PowerSlim folder. Use it to get the idea how to setup PowerSlim. Later you can use your own installation of the Fitnesse and/or IronPython. Please be sure that you have Java 6 installed before. You will get the Green Demo Suite at the end of the setup process. There are small amount of tests for a while. There will be more soon, stay tuned!

Original post starts here:
We have two hosts:
  • BUILDER (where we build our project)
  • TESTMACHINE (where we have SUT)
In that case we need to follow next steps to get the power of PowerSlim:
  1. BUILDER: install Java 6
  2. BUILDER: download the latest fitnesse.jar
  3. BUILDER: install Fitnesse http://fitnesse.org/FitNesse.UserGuide.DownloadingAndInstallingFitNesse
  4. TESTMACHINE: install the latest IronPython. Please use the msi to install it with the standard Python library. Use the folder without white-spaces (e.g. c:\IronPython) while installation.IronPython setup wizard
  5. TESTMACHINE: download the latest waferslim
  6. TESTMACHINE: put waferslim folder to the \IronPython\Lib\site-packages directory
  7. TESTMACHINE: download the latest PowerSlim
  8. TESTMACHINE: put it to some folder (e.g. c:\PowerSlim)
  9. TESTMACHINE: install PowerShell 2.0
Now we are ready for testing…to be continued…