Editing MicroMVDs for exchange requirements

From Wiki.OSArch

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
{{Template:MVD_Documentation}}
+
To guarantee the consistent and correct delivery of BIM data, exchange requirements and quality checks can be converted into computer-automated tests to check that data is entered, appropriately formatted, and that important semantic relationships between BIM entities exist. '''A test is a single sentence that a computer can use to automatically validate data.'''
To guarantee correct BIM data, data exchange requirements need to be specified and audited. '''A MicroMVD is a collection of sentences that describe auditing requirements, written in plain language understood by both technical and non-technical stakeholders. These sentences are organised into categories, and can be processed by a computer to automatically check whether or not the requirements are satisfied.'''
 
  
This approach builds on the concept in software development called [https://en.wikipedia.org/wiki/Unit_testing unit testing], specifically [https://en.wikipedia.org/wiki/Behavior-driven_development behavior driven development]. Describing the requirement in simple to understand (but still machine readable) [https://en.wikipedia.org/wiki/Cucumber_(software) gherkin format] makes the intentions clear to designers and makes writing unit tests simple.
+
For example, if an exchange requirement is to provide an IFC4 file, it may be written as <code>the file should be an IFC4 file</code>. An automated test running system will read this sentence, and verify that the requirement has been met. This automated test can be run on Windows, Mac, Linux, or any BIM server. A report will be automatically generated for stakeholders to review.
  
[[BIMTester]] has implemented use of MicroMVDs for auditing model quality from IFC files. [[BIMTester]] is integrated into the [[BlenderBIM Add-on]]
+
Three things are required to apply this testing workflow:
  
Here is an example of a simple MicroMVD, which checks that an IFC4 file is provided.
+
* BIM data in OpenBIM format, usually supplied by a BIM author
 +
* A list of exchange requirement tests, taken from the [[List of MicroMVDs]], or custom-built by a software developer
 +
* A test execution program, such as [https://blenderbim.org/download.html BIMTester]
  
<pre>
+
Unlike other testing solutions like Solibri, MicroMVDs are non-proprietary, do not expire, are free, much lighter, are easy to change and develop, and are cross-platform.
Feature: Project setup
 
  
In order to view the BIM data
+
== Authoring test suites ==
As any interested stakeholder
 
We need an IFC file
 
  
Scenario: Receiving a file
+
Each test suite is composed of one or more plain text files, given the file extension of <code>.feature</code>. It can be edited in any text editor, such as [https://www.vim.org/ Vim], Apple TextEdit, or Microsoft Notepad. The file name is arbitrary, but may be used to describe what it is testing.
* IFC data must use the "IFC4" schema
+
 
</pre>
+
An example of the content of a single <code>*.feature</code> file is shown below. Each <code>*.feature</code> file represents a test suite and must follow the format below.
  
This MicroMVD is stored in a simple text file with the <code>.feature</code> file extension. The file name is arbitrary, but may be used to describe what it is auditing. These simple text files can be edited in any text editor, such as [https://www.vim.org/ Vim], Apple TextEdit, or Microsoft Notepad. No proprietary software is required: anybody can read and write MicroMVDs.
+
<pre>Feature: Name of the exchange requirement
  
These <code>*.feature</code> files, each containing sentences like the above can be processed by a computer. In the example above, a MicroMVD auditing program will check that a particular IFC file uses the <code>IFC4</code> schema. The MicroMVD auditing program can then generate a report, which can be used by stakeholers to track whether or not a project is satisfying its requirements.
+
In order to achieve a business goal
 +
As a particular user or stakeholder
 +
We need to satisfy specific technical requirements
  
Unlike other auditing solutions like Solibri or SimpleBIM, MicroMVDs are non-proprietary, do not expire, are free, much lighter, are easy to change and develop, and are cross-platform.
+
Scenario: Check a particular technical requirement
 +
* Some data must be in a certain way
 +
* Some other data must be in another way
  
== List of MicroMVDs ==
+
Scenario: Check another particular technical requirement
 +
* Some data must be in a certain way
 +
* Some other data must be in another way
 +
</pre>
  
Although you are free to write your own MicroMVD specific to your project, a series of MicroMVDs have been published online that address common problems. You can copy and paste these templates into your own <code>*.feature</code> files, and modify it to suite your project.
+
A feature file always starts by defining the name of the <code>Feature</code>. It is then followed by one or more <code>Scenario</code> blocks. Each scenario has a name that focuses on a particular technical requirement of the exchange requirement, and contains one or more test sentences. Each sentence checks data related to the scenario. The feature name and scenario names can be anything, but must be prefixed by <code>Feature: </code> and <code>Scenario: </code> respectively. The test sentences within each <code>Scenario</code> block must match a pattern defined in the MicroMVD for the project.
  
==Sub pages==
+
These MicroMVDs are templates to be used as a starting point for projects to describe exchange requirements. It is encouraged to modify it to project requirements, delete irrelevant tests, and add new tests as required.
{{Subpages}}
 
  
All MicroMVD can be found in [[:Category:MicroMVD|MicroMVD]]
+
== Packaging test suites for recipients ==
  
== Auditing BIM data with BlenderBIM Add-on and MicroMVDs ==
+
The author of the test suite will provide a folder named <code>features/</code>. The contents of this folder will contain:
  
[[File:Bimtester.png|300px|thumb|right|The BIMTester Quality Auditing panel in the BlenderBIM Add-on]]
+
<pre>features/test-suite-A.feature # This is a test suite
 +
features/test-suite-B.feature # This is another test suite, you can have multiple
 +
features/environment.py # This defines the test environment
 +
features/template.html # This is the HTML report template
 +
features/steps/steps.py # The defines the test sentences
 +
</pre>
  
[[File:Bimtester-report.png|300px|thumb|right|An example audit report from BIMTester]]
+
These files constitute the full test system, and must be shared in full to all recipients and all authors. This ensures full transparency of exchange requirements.
  
To begin auditing BIM data, you will need an IFC file. Let's imagine you have a file called <code>file.ifc</code>.
+
The <code>steps.py</code> file requires basic programming knowledge to understand and modify, and is generally only modified by the test author.  Recipients are free to inspect it to gain a better understanding of what constitutes test compliance.
  
You will then need to specify your exchange requirements. Follow the steps below:
+
The <code>environment.py</code> file contains the environment settings to run the tests, using the [https://github.com/behave/behave Behave] system. An intermediate knowledge of <em>Behave</em> and <em>Python</em> is required to modify this file. For most recipients, this file must be left alone.
  
# Create a new text file called <code>audit.feature</code>
+
The <code>template.html</code> file contains a HTML report template. It is plain HTML code with [https://mustache.github.io/ Mustache] for the templating language. A basic knowledge of HTML and Mustache is required to modify this file, which is self-explanatory.
# Copy a MicroMVD template (e.g. [[Project setup MicroMVD]]) into your <code>audit.feature</code> file.
 
# Modify the template based on your project. For example, you may change the sentence <code> * IFC data must use the "{schema}" schema</code> to read <code> * IFC data must use the "IFC4" schema</code>.
 
  
Now that you have specified your exchange requirements, you can audit it using a program. One free and open source option is [https://blenderbim.org/download.html BIMTester], which comes with the [[BlenderBIM Add-on]], or can be [https://github.com/IfcOpenShell/IfcOpenShell/tree/v0.6.0/src/ifcbimtester run standalone]. Here's an example of how to audit it:
+
== Receiving and running test suites ==
  
# Launch Blender with the [[BlenderBIM Add-on]] installed.
+
A recipient will receive a <code>features/</code> directory. They are not required to modify the files in any way.
# Open up the ''BIMTester'' panel in the ''Scene Properties''.
 
# Navigate to your <code>file.ifc</code> file in the ''IFC File'' property. This is the IFC that will be audited.
 
# Navigate to your <code>audit.feature</code> file in the ''Feature / IDS'' property. This is your audit requirements file.
 
# Press the <code>Execute BIMTester</code> button.
 
# Your audit report results will pop up in your browser.
 
  
The ''Custom Steps'' is for advanced users who have built their own custom requirements. This requires coding knowledge.
+
The cross-platform, free software [https://blenderbim.org/download.html BIMTester] tool is capable of running the test suite and generating reports. The BIMTester tool expects the <code>features/</code> directory to be in the current working directory.
  
== Modifying a MicroMVD ==
+
Recipients are encouraged to run the tests and generate reports at their convenience. The test author may optionally provide an automated platform which runs tests and generate downloadable reports, as well as track progress on test results.
  
MicroMVDs are designed to be modified to be specific to your project. You are free to delete lines that don't apply to your project, or add additional lines if you need to audit more things in your project. You can have a single <code>.feature</code> or multiple files for each IFC, depending on how you want to organise your project. Once you have tailored it to your project, it is encouraged to include it in your project contract, so that all stakeholders are crystal clear on exactly what the data exchange requirements are, and how it will be audited.
+
== Maintaining test suites ==
  
If you know how to code, you can also define your own sentences. Read more in [[Developing custom MicroMVDs]].
+
The test suite will be working document that will grow throughout the project lifecycle to ensure that data quality regressions are not made, and that the level of information which has been audited is clearly documented.
  
[[Category:Model View Definitions (MVD)]] [[Category:BIMTester]] [[Category:BlenderBIM Add-on]] [[Category:MicroMVD]]
+
The test author will advise all recipients whenever new tests are being introduced or new test sentences are being defined.

Please note that all contributions to Wiki.OSArch are considered to be released under the Creative Commons Attribution-ShareAlike (see Wiki.OSArch:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)

Templates used on this page: