I started a new project and now I am using new tool, One of them is Hudson . Hudson is a tool to build easy and simple using. The tool is made in Java.
The dependencies basically is Java.
How to install the Hudson:
$ apt-get install sun-java6-jdk sun-java6-jre sun-java6-bin
visit the : http://www.java.com/en/download/linux_manual.jsp?locale=en&host=www.java.com:80
On Debian-based distributions, such as Ubuntu, you can install Hudson through apt-get.
1.Add the following line to your /etc/apt/sources.list:
$ deb http://hudson-ci.org/debian binary/
2.Update the APT index
$ sudo apt-get update
$ sudo apt-get install hudson
For execute the Hudson:
1. If you using the .war. If you installed the packages .deb,go to the next step.
$ java -jar hudson.war
2. Open the browser and type:
3. For create a new job is very simple.
3.1. Click on ” New Job “
3.2. Select the option , im my case I choose the “Build a free-style software project”
3.3 Select the options , wirte scripts and save.
I am learning a few of QtTest and I am showing the simple and little test for QtDate . The test verify if the date is valid and compare the actual date.
1 #include <QtTest>
5 class testDate: public QObject
9 private slots:
11 void testValidity();
12 void testCurrentDate();
16 /* Here the test for verifying if the date is Valid, can you change the Day for plus 31 and the Mo nth plus 12 */
17 void testDate::testValidity()
19 QDate date (2009, 04, 33);
24 /* Here the Date is compared with the actual Date */
25 void testDate::testCurrentDate()
28 QDate date, date2;
29 date.setYMD(2009, 4, 22);
30 date2 = QDate::currentDate();
31 QCOMPARE(date, date2);
38 #include “test1.moc”
QVERIFY ( condition )
The QVERIFY() macro checks whether the condition is true or not. If it is true, execution continues. If not, a failure is recorded in the test log and the test won’t be executed further.
QCOMPARE ( actual, expected )
The QCOMPARE macro compares an actual value to an expected value using the equals operator. If actual and expected are identical, execution continues. If not, a failure is recorded in the test log and the test won’t be executed further.