<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Test &#8211; privacyID3A</title>
	<atom:link href="https://www.privacyidea.org/tag/test/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.privacyidea.org</link>
	<description>flexible, Open Source Multi Factor Authentication (2FA)</description>
	<lastBuildDate>Sat, 30 May 2015 10:10:02 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.5</generator>

<image>
	<url>https://www.privacyidea.org/wp-content/uploads/2016/06/cropped-only-logo-white-background-32x32.png</url>
	<title>Test &#8211; privacyID3A</title>
	<link>https://www.privacyidea.org</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>About Testing</title>
		<link>https://www.privacyidea.org/about-testing/</link>
					<comments>https://www.privacyidea.org/about-testing/#respond</comments>
		
		<dc:creator><![CDATA[Cornelius Kölbel]]></dc:creator>
		<pubDate>Sat, 30 May 2015 10:00:36 +0000</pubDate>
				<category><![CDATA[Whatsup]]></category>
		<category><![CDATA[Test]]></category>
		<guid isPermaLink="false">https://www.privacyidea.org/?p=611</guid>

					<description><![CDATA[In winter 2014/15 privacyIDEA was migrated &#8211; or should I say rewritten &#8211; based on Flask. At this point it was also possible to restructure the library layer resulting in an unmangling of the old Pylons-based code. Thus it resulted in the fact, that the database layer, the library layer and the API layer could [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a href="https://www.privacyidea.org/wp-content/uploads/2015/05/graduation-149646_640.png"><img decoding="async" class="  wp-image-616 alignleft" src="https://www.privacyidea.org/wp-content/uploads/2015/05/graduation-149646_640-300x238.png" alt="graduation-149646_640" width="97" height="77" srcset="https://www.privacyidea.org/wp-content/uploads/2015/05/graduation-149646_640-300x238.png 300w, https://www.privacyidea.org/wp-content/uploads/2015/05/graduation-149646_640.png 640w" sizes="(max-width: 97px) 100vw, 97px" /></a>In winter 2014/15 privacyIDEA was migrated &#8211; or should I say rewritten &#8211; based on Flask. At this point it was also possible to restructure the library layer resulting in an unmangling of the old Pylons-based code. Thus it resulted in the fact, that the database layer, the library layer and the API layer could run totally independent from each other. I.e. each database function and each library function could be tested, without starting up a Flask instance.</p>
<p>This also results in the nice side effect, that the tool pi-manage.py can be used to create realms and configurations, without the server running, as pi-manage.py can directly access the library and database level. In addition policies where implemented using python decorators.</p>
<h2>Unit Tests</h2>
<p>All this resulted in an easy way to write simple modular tests, which you can find <a href="https://github.com/privacyidea/privacyidea/tree/master/tests" target="_blank">here</a>, and in a great test coverage of the server code of privacyIDEA. Unit tests are run at travis-ci and you can see the results <a href="https://travis-ci.org/privacyidea/privacyidea" target="_blank">here</a>.</p>
<h2>Code Coverage</h2>
<p>During the test run on Travis CI a code coverage report is generated. You can see the code coverage at <a href="https://coveralls.io/r/privacyidea/privacyidea" target="_blank">Coveralls.io</a>.</p>
<p>It is good to have a reliable server component. Well, but this was only the server code.</p>
<h2>UI Tests</h2>
<p>During the update from version 2.2 to 2.3 a <a href="https://github.com/privacyidea/privacyidea/issues/150" target="_blank">nasty bug</a> occurred. Due to a new API call, which was only accessible by users with the role &#8220;admin&#8221;, non-admin users were not able to enroll tokens anymore. The bug is nasty, since it could have been easily avoided.</p>
<p>So I took action to setup a better UI testing. As privacyIDEA is an open source project and aims to give you maximum transparency, we now created a workflow based on <a href="https://circleci.com/gh/privacyidea/privacyidea" target="_blank">Circle CI</a>, Heroku and Ghost Inspector.</p>
<p>After a <a href="https://github.com/privacyidea/privacyidea/blob/master/circle.yml" target="_blank">successful test at Circle CI</a> (the built of Ubuntu packages is tested), the current code gets uploaded to a dyno at Heroku.</p>
<pre>      - "[[ ! -s \"$(git rev-parse --git-dir)/shallow\" ]] || git fetch --unshallow"
      - git push &#103;&#x69;&#116;&#x40;&#104;&#x65;r&#x6f;k&#x75;&#46;&#99;&#x6f;&#109;:privacyidea-test.git $CIRCLE_SHA1:refs/heads/master
      - heroku pg:reset DATABASE_URL --confirm privacyidea-test
      - heroku run python ./pi-manage.py createdb --app privacyidea-test
      - heroku run --app privacyidea-test --  python ./pi-manage.py admin add -p 'Test1234!' admin admin@localhost</pre>
<ul>
<li>The database is resettet.</li>
<li>The database tables are created and</li>
<li>a default admin is created</li>
</ul>
<p>Then we have a running Heroku dyno with the current privacyIDEA server code.</p>
<p>Finally we start up our UI tests at <a href="https://ghostinspector.com/" target="_blank">Chost Inspector</a>.</p>
<p>We hope all this results in better code to suit your needs. But as important as tests is your feedback, which helps to improve code and features.</p>
<p>Thanks a lot!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.privacyidea.org/about-testing/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
