What testing framework/unit testing to use with Delphi XE Starter Edition - delphi

I'm looking at moving from Delphi 2007 (purchased by my employer) to Delphi XE Starter Edition (purchased by me because my employer is moving away from Delphi) for some open source/hobby work. So, price is definitely a concern.
Delphi XE Starter Edition doesn't appear to have the integrated DUnit stuff. Are there any recommendations for testing frameworks that will work well with XE Starter? The framework must be automatible; for example, it must must be runnable by a Continuous Integration System such as Hudson or CruiseControl. Of course, free would be best. Integration directly into the IDE would also be handy, but not a requirement.

DUNIT is on SourceForge so you can get it from there. The version on SF is 9.4.0, the same that ships with Delphi XE. The code is however not identical. I do not know if it works with Delphi XE Starter edition but I don't see why it should not.

Will DUnit2 do?
Dunit2 is used in tiOPF framework and said to be quite good. The download sites are:
http://sourceforge.net/projects/dunit2/
http://members.optusnet.com.au/~mcnabp/
http://github.com/graemeg/dunit2

DUnit may be a better choice that DUnit2. With DUnit you can use the jcl and USE_JEDI_JCL to get the line numbers of failures. DUnit2 doesn't appear to support this.
DUNit2 doesn't seem to be getting much attention since Peter's death either. I don't know if it has been updated to use the latest version of delphi but it doesn't look like it.

Related

unit testing tool for delphi XE4

what is the options for unit testing in delphi XE4? i'm trying to use DUnit but it seems didn't have any official version for XE4 and source didn't compile
Delphi has for a long time, and XE4 is no different, shipped with DUnit. You need to make sure that you select it in the install options.
The version that is shipped with Delphi is already updated to work with the version of Delphi that it ships with. Looking at the DUnit sourceforge project, it seems rather moribund. The last commit to the SVN archive that mentions Delphi versions is for Delphi 2009. So it seems clear to me that you are best sticking with the version that ships with Delphi.
You may be interested with the unit testing features available within our mORMot Open Source framework. See this StackOverflow answer.
In addition with unit testing with classes, just like DUnit, you have at hand a whole mocking/stubbing framework.
Using interfaces, in a SOLID context, is therefore more integrated within this framework than with DUnit. For instance, interface mocking directly links to a test case, so is able to be integrated within the unit test suit.
It is perfectly working with Delphi XE4, in both 32 bit and 64 bit Windows platforms.
There is a new project called DUnitX. It is intended to take advantage of newer features in the language and framework and works with Delphi 2010 and later.
Still very much a work in progress, but it is currently active and you will probably recognise some of the people who are working on it.

Will programs developed using Embarcadero Delphi XE3 work with Embarcadero Delphi 2010

We are trying to develop a form that will be added to a project written and created using Embarcadero Delphi 2010 , We will use Embarcadero Delphi XE3 as our Development Environemt, will the code that we will write work on Embarcadero Delphi 2010 ?
If not where can I download Embarcadero Delphi 2010, I can't find it on the Embarcadero official site.
Thanks
Previous versions can be downloaded here:
http://www.embarcadero.com/xe3-earlier-versions
Depends ....
if you don't use rtti and generics and remove qulified namespaces, restrict the use of foreign components it could work, but i think it's not recommended.
If you are properly registered you have an edn account:
Pick Downloads / Registered User Downloads
It is in there. You should be able to go back to Delphi 7. 2010 is at the bottom of the page.
The latest stuff in XE3 is highly recommended. The improvements over the last few years are definitely worth it, and the upgrade will pay for itself in very short time even if you only gradually learn and use the new stuff.

How to install TAdoConnection in delphi XE2 starter?

I just bought Delphi XE2 starter and want to upgrade my projects. One of them is failing because Delphi doesn't know what TAdoConnection is.
I stupidly didn't keep a copy of the package when I D/Led it a few years ago now can't remember where I cgot it from
How to install TAdoCOnnection et al into Delphi XE2? Thanks
Update: alas, I have the Starter edition (who can afford anything else?)
Later update, just in case anyone else wants to do some database stuff with a starter edition.
I paid for AnyDac and was very happy, but then it was bought by Embarcadero, so you can't purchase it separately any more. I have a bug with Sqlite, so am looking for alternates.
Start here http://www.freebyte.com/programming/delphi/#freedelphidatabasecompone
ZeosLib looks very promising http://zeoslib.sourceforge.net/portal.php
It comes with Delphi, as long as you don't just have the "starter" edition, so you should already have it installed. Look in the ADODB unit. There is no other package to download.
It should be there, under ADODB:
http://docwiki.embarcadero.com/VCL/en/ADODB
http://docwiki.embarcadero.com/VCL/en/ADODB.TADOConnection
http://docwiki.embarcadero.com/CodeSamples/en/ADOQuery_%28Delphi%29
ADDENDUM:
Here's the XE2 feature matrix:
http://www.embarcadero.com/images/Delphi/delphi_short_feature_matrix_large.png
ADO is available on all versions ... EXCEPT the "starter version".
Since you have the Starter version, there is no direct option for TADOConnection. You either upgrade your version of Delphi, or use something other than TADOConnection.

is Delphi still the same (still run with no installed libraries)?

Back when I used Delphi (win32), programs made with it would run on windows, with no need to install any runtime libraries like .NET or Java(?). Is this still the case? If not, which language can do that?
Delphi executables don't have any external dependency.
It's true since Delphi 1 up to Delphi XE.
I just wrote a post on my blog about this fact I like very much in Delphi.
http://blog.synopse.info/post/2010/09/20/Dll-hell%2C-WinSXS-directory-and-Delphi-paradise
No dll hell with Delphi applications!
Deploying a Delphi application is very easy.
If you need some database access, you could need some additional components, like the BDE, or the ODBC drivers, or whatever...
But there are a lot of stand-alone frameworks, with no external dependency, available for Delphi. We provide one Client/Server Open Source solution, using SQLite3 as database storage. And one of great feature of SQLite3 is that it doesn't need to install any client software. Our framework provide the Client/Server features, in pure Delphi.
Both the language and the IDE had some serious improvements from Delphi 1.
To name a few extentions for the language:
Support for interfaces
Records with methods
Record and class helper functions
Annonymous functions
Generics
Hinting directives
There are also some IDE improvements.
Unicode support
More integrated tools
Usage of identifiers (2011).
There are still some things missing:
64 bit support
generics still have some bugs.
It is still the case for the "normal" Delphi, i.e. Delphi for Win32. There is also Delphi Prism which targets .NET for which it is obviously not the case.
Currently there's Delphi for Win32 available, which doesn't require any runtimes and Delphi Prism (for .NET application development). Delphi for 64-bit native Windows development is promised next year.
Well, Lazarus obviously :-)
Seriously, Delphi is fine, but before you buy a recent one, if you need win9x support, check thoroughly. (since the unicode versions might no longer support that)

Is Delphi Prism a new version of Delphi .net?

First of all (before this question get down voted): I am a developer developing 99,99% of my programs using Delphi targeting Win32 (developing in Delphi 7 still, very slowly migrating to Delphi 2010).
When Delphi 2006 or 2007 (can't remember which version at the moment) came out I bought the RAD Studio edition to be able to start developing .net applications using Delphi.net and VCL.net.
I played around with it for some short time, but in the end, due to work load just kept using Delphi 7 as development platform.
When Delphi 2010 came was released, I decided to give .net a go once more, and (foolishly) bought the Studio License once more thinking the include PRISM was the previous Delphi.net (to be developed in the Delphi IDE).
Now that I have installed PRISM (and the Visual Studio 8 IDE - o horror), I am just wondering whether PRISM is a new version of Delphi.Net or not (probably not). And if I can use some of my Win32 code under Prism.
UPDATE AFTER SOME REPLIES: I keep the question open because you get more answers when a answer has not been selected yet.
I do miss the Delphi IDE though. It's all a mather of taste but having to develop in two different IDE's (where f.i. the keyboard shortcuts are different - and I don't want to give up the Delphi ones, thank you)) is not my idea of spending my development time.
Prism is a replacement for Delphi .Net - it has been developed by RemObjects and its original names were Oxygene and Chrome ( http://www.remobjects.com/ ).
Because it's much more mature than Delphi .Net in the .Net segment it now is included in Delphi RAD Studio instead of Delphi .Net.
You won't be able to use all of your W32 code, but the syntax is very similar and most algorithms will probably work without any change.
See http://prismwiki.codegear.com/en/Win32_Delphi_vs._Delphi_Prism for a detailed comparison of Delphi W32 and Delphi Prism.
No. Delphi.NET was designed specifically to be backwards-compatible with Win32 Delphi code. Prism is not. It was not developed by the Borland/CodeGear team, doesn't include VCL support, and has a handful of minor language differences. It's better to think of it as a new dialect of Object Pascal than as Delphi.NET.
The main difference was that Delphi.Net was mainly a port of the RTL/VCL to .Net, as well as an adaptation of Object Pascal to be a .Net language.
It had to include a full blown IDE with a special Delphi.Net Form Designer.
The goal was to help move a VCL Forms application to .Net with a minimum of changes, or create new application without having to re-learn the IDE and the library.
Delphi Prism is also an adaptation of Object Pascal to the .Net world but with more emphasis on being a fully fledged .Net language (even more so than C#) and much less worries on being compatible with Delphi.
It is just the language, hosted in Visual Studio, and does use whatever designer is provided by the IDE.
So in the end pure Pascal code will be very much similar, and easily ported, but rich GUI applications will need more rewriting/redesigning.
Yes and no.
Oxygene (FKA Delphi Prism) replaces Delphi for .NET, but it is not a new version of it.
They have different design philosophies and are not 100% compatible. As Francois pointed out, Prism does not include the VCL.Net. Instead it focuses completely on supporting the .NET GUI Frameworks: WPF, Silverlight, Prism, WinForms, ASP.NET, etc.
Delphi for .NET was all about migrating and backwards compatibility. Delphi Prism is all about being a full featured .NET development language and "forward compatibility."
You can create you pure business logic as code compatible between Delphi native and Delphi Prism, but all the GUI and IO code (anything that makes use of the VCL or RTL) will be specialized.
Check out the Oxidizer and ShineOn for more help in migrating and code compatibility with Delphi Prism.
No, Prism has been labeled Delphi more to make it more popular, like Delphi PHP.
It's not like Delphi.NET, with a VCL-alike etc, or even a compatible language (it uses method instead of procedure and many other deviations).
So you can see if you like it, but from what I have seen from it, having used Delphi won't be much of an help, and neither do existing codebases.

Resources