CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Has no-one created unit tests for OpenFOAM with mocks?

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By Kojirion

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 31, 2015, 06:33
Default Has no-one created unit tests for OpenFOAM with mocks?
  #1
New Member
 
Kojirion's Avatar
 
Albert Yiamakis
Join Date: Jun 2015
Posts: 6
Rep Power: 10
Kojirion is on a distinguished road
Hello,

my supervisor and I are writing a library to extend twoPhaseEulerFoam and we have a suite of unit tests for our classes. One of the trickiest bits has been handling depencencies to OpenFOAM classes, in particular as several of them appear to require a mesh to be constructed.

So far we have managed by separating some of the classes that interact with OF with some of those that do our calculations (so the latter are testable). But we believe the 'proper' design would be to have mocks of OF; as far as I can tell, such do not exist.
Is this correct? Might start writing mocks in time, but would like to make sure this would not be duplicating any effort.

Last edited by Kojirion; July 31, 2015 at 09:12.
Kojirion is offline   Reply With Quote

Old   August 31, 2015, 16:09
Default
  #2
Senior Member
 
Pete Bachant
Join Date: Jun 2012
Location: Boston, MA
Posts: 173
Rep Power: 13
pbachant is on a distinguished road
I don't have an answer, but am interested. Do you have your test code up somewhere? I need some inspiration for how to start writing and running unit tests.
__________________
Home | Twitter | GitHub
pbachant is offline   Reply With Quote

Old   August 31, 2015, 16:11
Default
  #3
New Member
 
Kojirion's Avatar
 
Albert Yiamakis
Join Date: Jun 2015
Posts: 6
Rep Power: 10
Kojirion is on a distinguished road
Not yet, we aim to put it on a public repository within the next month.
pbachant likes this.
Kojirion is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ICEM] Merge created block resulting in not connected mesh imamwfgf ANSYS Meshing & Geometry 2 October 20, 2013 06:22
OpenFOAM 1.7.1 installation problem on OpenSUSE 11.3 flakid OpenFOAM Installation 16 December 28, 2010 08:48
Installation OF1.5-dev ttdtud OpenFOAM Installation 46 May 5, 2009 02:32
Regarding FoamX running Kindly help out hariya03 OpenFOAM Pre-Processing 0 April 18, 2008 04:26
CFX4.3 -build analysis form Chie Min CFX 5 July 12, 2001 23:19


All times are GMT -4. The time now is 17:20.