Author Topic: Continuos Integration & Unit Testing  (Read 3902 times)

Offline peatar

  • Single posting newcomer
  • *
  • Posts: 2
Continuos Integration & Unit Testing
« on: January 28, 2012, 03:02:07 pm »
Codeblocks is really nice! 3 questions:

 * After a bit trouble I got unit testing working. Is this the best way to do it? http://stackoverflow.com/q/9027364/194609
 * How can I do continuos integration with a codeblocks project? Or do I (really) need to create a makefile to run it on a server?
 * With NetBeans' C++ plugin it is often possible to refactor (e.g. rename variables / methods). Can this be done with codeblocks too?

Peter.

Offline renega_666

  • Multiple posting newcomer
  • *
  • Posts: 36
Re: Continuos Integration & Unit Testing
« Reply #1 on: January 28, 2012, 04:12:38 pm »
I don't know about your two first questions but for the latest you have a code refacotring menu when right clicking on the variable/method you want to rename.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5503
Re: Continuos Integration & Unit Testing
« Reply #2 on: January 28, 2012, 04:21:41 pm »
see http://wiki.codeblocks.org/index.php?title=UnitTesting

And typically :
- library providing functionality
- app using it, where unit test exe is just like any app using it

Offline peatar

  • Single posting newcomer
  • *
  • Posts: 2
Re: Continuos Integration & Unit Testing
« Reply #3 on: January 28, 2012, 05:12:42 pm »
> you have a code refacotring menu when right clicking on the variable/method you want to rename.

hmmh cannot find such in 10.05


> see http://wiki.codeblocks.org/index.php?title=UnitTesting

I know that but as I explained in the SO question it is suboptimal. At least when creating this library is a separate step. Or do you know how to solve this separate step?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Continuos Integration & Unit Testing
« Reply #4 on: January 28, 2012, 07:20:30 pm »
* How can I do continuos integration with a codeblocks project? Or do I (really) need to create a makefile to run it on a server?
Open a terminal and start codeblocks --help
We have some batch build capabilities, but on linux you need a X11 server running.

* With NetBeans' C++ plugin it is often possible to refactor (e.g. rename variables / methods). Can this be done with codeblocks too?
You need a nightly build for this to partly work.

I know that but as I explained in the SO question it is suboptimal. At least when creating this library is a separate step. Or do you know how to solve this separate step?
What is the optimal way in your opinion?

What I do when I do unit testing is to make a console project and put all needed files there.
Then I make the main app depend on the unit test project.
« Last Edit: January 28, 2012, 07:22:32 pm by oBFusCATed »
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline renega_666

  • Multiple posting newcomer
  • *
  • Posts: 36
Re: Continuos Integration & Unit Testing
« Reply #5 on: January 29, 2012, 02:30:18 am »
Quote
hmmh cannot find such in 10.05

 Yes I think it was introduced in a nightly...