<?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>TestMace &#8211; TestMace / blog</title>
	<atom:link href="https://testmace.com/blog/category/testmace/feed/" rel="self" type="application/rss+xml" />
	<link>https://testmace.com/blog</link>
	<description></description>
	<lastBuildDate>Fri, 13 Mar 2020 06:54:09 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.9.13</generator>

<image>
	<url>https://testmace.com/blog/wp-content/uploads/2018/11/cropped-favicon-1-32x32.png</url>
	<title>TestMace &#8211; TestMace / blog</title>
	<link>https://testmace.com/blog</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Powerful IDE to work with API</title>
		<link>https://testmace.com/blog/2019/07/01/powerful-ide-to-work-with-api/</link>
		<comments>https://testmace.com/blog/2019/07/01/powerful-ide-to-work-with-api/#respond</comments>
		<pubDate>Mon, 01 Jul 2019 08:01:50 +0000</pubDate>
		<dc:creator><![CDATA[Dmitriy Snytkin]]></dc:creator>
				<category><![CDATA[TestMace]]></category>

		<guid isPermaLink="false">https://testmace.com/blog/?p=8282</guid>
		<description><![CDATA[Hello there! Today is the day when we&#8217;re ready to present to the IT community TestMace, our IDE for API design. Some of you may know about it from the previous article. However, we haven&#8217;t yet provided you with an overall review of our tool, so here you go. Motivation We&#8217;d like to start by...]]></description>
				<content:encoded><![CDATA[<p>Hello there! Today is the day when we&#8217;re ready to present to the IT community TestMace, our IDE for API design. Some of you may know about it from the previous article. However, we haven&#8217;t yet provided you with an overall review of our tool, so here you go.</p>
<h2><strong>Motivation</strong></h2>
<p>We&#8217;d like to start by telling you the story on how we ended up with this feeling of creating our own advanced API tool at the first place. Here&#8217;s the list of features we suppose every IDE for API design should have:</p>
<ul>
<li>creating and sending requests and scenarios (request chains);</li>
<li>writing different kinds of tests;</li>
<li>test generation;</li>
<li>working with API description, including importing fromSwagger, OpenAPI, WADL, etc.;</li>
<li>mocking requests;</li>
<li>great support of one or several scripting languages and integration with the most popular libraries;</li>
<li>and so on.</li>
</ul>
<p>Follow your preferences to complete the list. Apart from IDE, it is also quite important to create a specific infrastructure like cloud synchronization, CLI tools, online monitoring service, etc. After all, the latest trends are about not only powerful features, but also a nice interface.</p>
<p>Who will benefit from it? Apparently, those who are in any way connected with API development and testing, developers and testers in particular. While developers are often limited to sending single requests and running simple scenarios, in their main tool testers are going to need something more advanced, including powerful features for writing tests and ability to run them in CI.</p>
<p>Having all that in mind, we started designing our product. Let&#8217;s look at what we have achieved so far.</p>
<h2><strong>Quick Start</strong></h2>
<p>Let&#8217;s start with simply looking at our app. You can download it from <a href="https://client.testmace.com/">our site</a>. For now, all 3 main platforms are supported &#8211; Windows, Linux, and MacOS. Download the app, install it and run. Running it the first time, you&#8217;ll see this window:</p>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/07/image001.png"><img class="size-full wp-image-8283 aligncenter" src="https://testmace.com/blog/wp-content/uploads/2019/07/image001.png" alt="" width="1920" height="1056" srcset="https://testmace.com/blog/wp-content/uploads/2019/07/image001.png 1920w, https://testmace.com/blog/wp-content/uploads/2019/07/image001-300x165.png 300w, https://testmace.com/blog/wp-content/uploads/2019/07/image001-1024x563.png 1024w" sizes="(max-width: 1920px) 100vw, 1920px" /></a></p>
<p>Click on the + button in the top of content area to create your first request. The request tab should look like this:</p>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/07/image003.png"><img class="size-full wp-image-8285 aligncenter" src="https://testmace.com/blog/wp-content/uploads/2019/07/image003.png" alt="" width="1920" height="1056" srcset="https://testmace.com/blog/wp-content/uploads/2019/07/image003.png 1920w, https://testmace.com/blog/wp-content/uploads/2019/07/image003-300x165.png 300w, https://testmace.com/blog/wp-content/uploads/2019/07/image003-1024x563.png 1024w" sizes="(max-width: 1920px) 100vw, 1920px" /></a></p>
<p>Let&#8217;s take a closer look at it. The request interface resembles popular rest clients interface, which makes migration from that kind of tools easier. Let&#8217;s send our first request to <a href="https://next.json-generator.com/api/json/get/NJv-NT-U8">https://next.json-generator.com/api/json/get/NJv-NT-U8</a></p>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/07/image005.png"><img class="size-full wp-image-8286 aligncenter" src="https://testmace.com/blog/wp-content/uploads/2019/07/image005.png" alt="" width="1920" height="1053" srcset="https://testmace.com/blog/wp-content/uploads/2019/07/image005.png 1920w, https://testmace.com/blog/wp-content/uploads/2019/07/image005-300x165.png 300w, https://testmace.com/blog/wp-content/uploads/2019/07/image005-1024x562.png 1024w" sizes="(max-width: 1920px) 100vw, 1920px" /></a></p>
<p>Apparently, the response panel has nothing to surprise us with. But still you have to know, that:</p>
<ol>
<li>The response body represents a tree, that makes it more informative and allows to add some curious features described down below.</li>
<li>There is the Assertions tab, that has a list of tests for this particular request.</li>
</ol>
<p>As you can see, our tool can be used as a well-organized rest client. But sending requests is not what we&#8217;re here for. Now let&#8217;s talk about the main features and concepts of TestMace.</p>
<h2><strong>TestMace&#8217;s Main Features and Concepts</strong></h2>
<h3><strong>Node</strong></h3>
<p>TestMace&#8217;s workflow is distributed into different node types. The previous example illustrates how RequestStep node works. Some other node types are now available in the app:</p>
<ul>
<li>This is a node that you use to create a request. It can have only one Assertion node as a child element.</li>
<li>This one is used for writing tests. It can be a child node only for a RequestStep node.</li>
<li>It allows to group Folder and RequestStep nodes under it.</li>
<li>This is a root node, that is created automatically when you start a new project. It is functionally identical to a Folder node.</li>
<li>This is a link to Folder or RequestStep nodes. It allows to reuse requests and scenarios.</li>
</ul>
<p>You can find nodes in scratches (a bottom left panel for quick creating one-time requests) and in project (a top left panel), that I&#8217;m going to show you next.</p>
<h3><strong>Project</strong></h3>
<p>After running the app, you can see a Project line at the top left of the screen. That is the project tree root. When you run your project, a temporary project is created, and the path to it depends on your operating system. You can change it whenever you want.</p>
<p>The main purpose of the project is to give you an ability to save your drafts in the file system, synchronize it via the version control system, run scenarios in CI, review changes, etc.</p>
<h3><strong>Variables</strong></h3>
<p>Variables is one of the core mechanisms of our app. Those of you who work with TestMace-like tools might already have it in mind. Variables is a way of saving shared data and communication between nodes. Environment variables in Postman and Insomnia are a great example of this. But we have gone beyond all that. In TestMace you can define your variables at the node level. Any node. There is also a mechanism of inheritance variables from parents and overriding variables in child elements. In addition, there are several default variables, which names start with <span style="color: red;">$</span>. Here are some of them:</p>
<ul>
<li><span style="color: red;">$prevStep</span> &#8211; a reference to the previous node variables;</li>
<li><span style="color: red;">$nextStep</span> &#8211; a reference to the next node variables;</li>
<li><span style="color: red;">$parent</span> &#8211; a reference to the parent node variables;</li>
<li><span style="color: red;">$response</span> &#8211; a server response;</li>
<li><span style="color: red;">$env</span> &#8211; current environment variables;</li>
<li><span style="color: red;">$dynamicVar</span> &#8211; dynamic variables, that are being created during scenario or request run.</li>
</ul>
<p><span style="color: red;">$env</span> are basically just the Project node variables, but the variables set is different for every environment.</p>
<p>You can access a variable using <span style="color: red;">${variable_name}</span>.</p>
<p>The value of that variable might contain another variable or even an expression. For instance, an url variable value may be the following:</p>
<pre><code >http://${host}:${port}/${endpoint}</code></pre>
<p>It should be mentioned, that you can assign variables while running scripts. For example, quite often it is important to save authorization data (a token or full header) that come from the server after a successful login. TestMace allows you to store that data in parent&#8217;s dynamic variables. To avoid collision with existing static variables, dynamic variables have been placed in a separate object &#8211; <span style="color: red;">$dynamicVar</span>.</p>
<h3><strong>Scenarios</strong></h3>
<p>Taking advantage of the features stated above, you can run request scenarios. For example, create an entity -&gt; request an entity -&gt; delete an entity.In this case, you can use a Folder node to group several RequestStep nodes.</p>
<h3><strong>Autocomplete Feature and Expression Value Highlighting</strong></h3>
<p>To make working with variables more convenient, we added an autocomplete feature and variables&#8217; values highlighting, that shows you what value each variable has. A picture paints a thousand words here:</p>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/07/auto_complete.gif"><img class="size-full wp-image-8287 aligncenter" src="https://testmace.com/blog/wp-content/uploads/2019/07/auto_complete.gif" alt="" width="1085" height="276" /></a></p>
<p>Note that not only variables, but also such things as headers, some headers&#8217; values (like Cotent-Type), protocols are autocompleted. With development of our product, the list is regularly updated.</p>
<h3><strong>Undo/Redo</strong></h3>
<p>Ability to undo/redo changes is a practically useful feature, yet not every tool comes with it (including API tools). We&#8217;re here to change it! 🙂 Undo/redo works within the whole project, which allows you to undo not only changes to a particular node, but also its creating, deleting, moving and so on. The most critical operations need to be confirmed.</p>
<h3><strong>Creating Tests</strong></h3>
<p>Assertion node takes care of creating tests. One of the major features here is creating tests without programming using build-in editors.</p>
<p>An assertion node is a number of assertions, each of which has its own type. There are several types:</p>
<ol>
<li>Compare values &#8211; it simply compares two values. We have several comparison operators: &#8220;equal to&#8221;, &#8220;not equal to&#8221;, &#8220;greater than&#8221;, &#8220;greater than or equal to&#8221;, &#8220;less than&#8221;, &#8220;less than or equal to&#8221;.</li>
<li>Contains value &#8211; checks if a substring is present in a string.</li>
<li>XPath &#8211; checks if there is a certain value in XML via selectors.</li>
<li>JavaScript assertion &#8211; a random JavaScript script that returns true on success and false on failure.</li>
</ol>
<p>Note that only the latter requires some programming skills, the other three are created with the help of graphical user interface. Here is an example of creating compare values assertion dialog:</p>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/07/image009.png"><img class="size-full wp-image-8288 aligncenter" src="https://testmace.com/blog/wp-content/uploads/2019/07/image009.png" alt="" width="606" height="613" srcset="https://testmace.com/blog/wp-content/uploads/2019/07/image009.png 606w, https://testmace.com/blog/wp-content/uploads/2019/07/image009-297x300.png 297w" sizes="(max-width: 606px) 100vw, 606px" /></a></p>
<p>Quick assertions creation right from the response would be our icing on the cake. Just look at this!</p>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/07/image011.png"><img class="size-full wp-image-8289 aligncenter" src="https://testmace.com/blog/wp-content/uploads/2019/07/image011.png" alt="" width="1540" height="938" srcset="https://testmace.com/blog/wp-content/uploads/2019/07/image011.png 1540w, https://testmace.com/blog/wp-content/uploads/2019/07/image011-300x183.png 300w, https://testmace.com/blog/wp-content/uploads/2019/07/image011-1024x624.png 1024w" sizes="(max-width: 1540px) 100vw, 1540px" /></a></p>
<p>However, these assertions clearly have certain limitations, so you can use javascript assertions. Here TestMace provides you with a nice environment with autocomplete feature, syntax highlighting and even static analyzer.</p>
<h3><strong>API Description</strong></h3>
<p>TestMace allows not only to use API, but also to write documentation. The description itself has a hierarchical structure and fits the project naturally. In addition to that, you can import API descriptions from Swagger 2.0 / OpenAPI 3.0 formats. The description is not left aside, but fully integrates with the project: autocompletion of urls, HTTP headers, query parameters is available, and we&#8217;re planning to add tests to check if a response matches API description.</p>
<h3><strong>Nodes Sharing</strong></h3>
<p>Let&#8217;s say you need to share a bugged request or scenario with a colleague or just attach it to the bug. TestMace&#8217;s got it: it allows you to serialize any node or a subtree in url. Just copy-paste and you have your request shared with another machine or project.</p>
<h3><strong>Human-Readable Format for Project Storing</strong></h3>
<p>Each node is stored either in a separate .yml file (like Assertion node is) or in a folder with the node&#8217;s name containing index.yml file.</p>
<p>That is how the file with the request from the previous example looks like:</p>
<pre><code class="yaml">children:  &#091;&#093;<br />
variables: {}<br />
type: RequestStep<br />
assignVariables:  &#091;&#093;<br />
requestData:<br />
  request:<br />
    method: GET<br />
    url: 'https://next.json-generator.com/api/json/get/NJv-NT-U8'<br />
  headers:  &#091;&#093;<br />
disabledInheritedHeaders:  &#091;&#093;<br />
  params:  &#091;&#093;<br />
  body:<br />
    type: Json<br />
jsonBody: ''<br />
xmlBody: ''<br />
textBody: ''<br />
formData:  &#091;&#093;<br />
    file: ''<br />
formURLEncoded:  &#091;&#093;<br />
strictSSL: Inherit<br />
authData:<br />
  type: inherit<br />
name: Scratch 1<br />
</code></pre>
As you can see, it&#8217;s totally readable. You can easily edit it manually if you need.</p>
<p>The directory hierarchy is the same as the nodes hierarchy. For example, this scenario:</p>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/07/image013.png"><img class="size-full wp-image-8290 aligncenter" src="https://testmace.com/blog/wp-content/uploads/2019/07/image013.png" alt="" width="389" height="244" srcset="https://testmace.com/blog/wp-content/uploads/2019/07/image013.png 389w, https://testmace.com/blog/wp-content/uploads/2019/07/image013-300x188.png 300w" sizes="(max-width: 389px) 100vw, 389px" /></a></p>
<p>Is mapping in the file system to the following structure (only directory hierarchy is shown, but it should be clear):</p>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/07/image015.png"><img class="size-full wp-image-8291 aligncenter" src="https://testmace.com/blog/wp-content/uploads/2019/07/image015.png" alt="" width="219" height="143" /></a></p>
<p>That simplifies the project review process.</p>
<h3><strong>Import from Postman</strong></h3>
<p>Having read all this, some of you may be wanting to try out our new product (aren&#8217;t you?) or even use it in your project (why the hell not). Well, you must be hesitating since you&#8217;ve got all your work done in Postman. In this case, TestMace supports importing collections from Postman. It is without tests for now, but we may include it in our future releases.</p>
<h2><strong>Our Plans</strong></h2>
<p>We&#8217;re hoping after reading all this many of you have found our product interesting. And it&#8217;s just a beginning! At the moment we&#8217;re fully involved in developing and I&#8217;m going to tell you about what we&#8217;re going to do next.</p>
<h3><strong>Cloud Synchronization</strong></h3>
<p>That&#8217;s one of the most desirable features. Now we suggest you use the version control system for it, working on making everything in our app compatible with it. However, some of you may not be particularly happy with this workflow, so we&#8217;re planning to add cloud synchronization mechanism that you used to.</p>
<h3><strong>CLI</strong></h3>
<p>As I already mentioned, it&#8217;s hard to imagine any IDE product without integration with existing projects or workflow. CLI is essential for integrating tests written in TestMace into continuous integration process. We&#8217;re currently working on it, but in our early versions projects will run with a simple console report. In the future you&#8217;ll see reports in JUnit format.</p>
<h3><strong>Plugin System</strong></h3>
<p>Despite all functionality, our product can&#8217;t cover all possible use cases. Each project is unique, and there may be too many specific tasks. That is why we&#8217;ve been thinking to add SDK for plugins development, so that each individual user could meet their own needs.</p>
<h3><strong>New Node Types</strong></h3>
<p>Some use cases may require more node types, than we have now. We&#8217;re planning to add:</p>
<ul>
<li>Script Node, which transforms and stores data using js and the corresponding API. This node type might be useful for writing something like pre-request and post-request scripts in Postman;</li>
<li>GraphQL Node for graphql support;</li>
<li>Custom Assertion Node to expand the set of existing assertions in the project;</li>
</ul>
<p>The list is definitely not complete yet, and your feedback would help us update it.</p>
<h2><strong>FAQ</strong></h2>
<p><strong>How is your product different from Postman?</strong></p>
<ol>
<li>The node concept allows to scale your product functionality with no limits.</li>
<li>The human-readable format of the project and storing it in the file system makes it easier to work with the version control system.</li>
<li>Creating tests without programming and advanced js support in the test editor (autocomplete feature, static analyzer).</li>
<li>More sophisticated autocomplete feature and highlighting of current variables&#8217; values.</li>
</ol>
<p><strong> </strong><strong>Is this an open-source product?</strong></p>
<p>No, source files are not available, but in the future we&#8217;re considering to add this option.</p>
<p><strong> </strong><strong>What are you living on? 🙂</strong></p>
<p>Along with the free version, there will soon be a paid one. It&#8217;ll first of all include the features, like synchronization that require the server side.</p>
<h2><strong>Conclusion</strong></h2>
<p>We&#8217;re working hard to finally release a stable version of TestMace. We&#8217;ve received a positive feedback from our first users, so you can already safely try out our product. We would really appreciate your feedback as well, since it is impossible to create a great tool without close cooperation with the community. Contact us:</p>
<ul>
<li>Official site: <a href="https://client.testmace.com">https://client.testmace.com</a></li>
<li>Telegram: <a href="https://t.me/testmace">https://t.me/testmace</a></li>
<li>Slack: <a href="https://testmaceslackin.herokuapp.com">https://testmaceslackin.herokuapp.com</a></li>
<li>Facebook: <a href="https://www.facebook.com/testmace">https://www.facebook.com/testmace</a></li>
<li>Issues-tracker: <a href="https://github.com/TestMace/TestMace-issues">https://github.com/TestMace/TestMace-issues</a></li>
</ul>
<p>We&#8217;re looking forward to your comments!</p>
]]></content:encoded>
			<wfw:commentRss>https://testmace.com/blog/2019/07/01/powerful-ide-to-work-with-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TestMace beta. Features overview, part 2</title>
		<link>https://testmace.com/blog/2019/01/28/testmace-beta-features-overview-part-2/</link>
		<comments>https://testmace.com/blog/2019/01/28/testmace-beta-features-overview-part-2/#respond</comments>
		<pubDate>Mon, 28 Jan 2019 05:25:11 +0000</pubDate>
		<dc:creator><![CDATA[Dmitriy Snytkin]]></dc:creator>
				<category><![CDATA[TestMace]]></category>

		<guid isPermaLink="false">https://testmace.com/blog/?p=8205</guid>
		<description><![CDATA[In the last article we described a few TestMace features using a simple case, and today we&#8217;ll continue reviewing our app. The Project We have already given the definition of the project. Basically, it is no different from one of any typical IDE, graphics editor and other apps. A TestMace project is stored in the...]]></description>
				<content:encoded><![CDATA[<p>In the <a href="https://testmace.com/blog/2019/01/28/testmace-beta-features-overview-part-1/">last article</a> we described a few TestMace features using a simple case, and today we&#8217;ll continue reviewing our app.</p>
<h3><strong>The Project</strong></h3>
<p>We have already given the definition of the project. Basically, it is no different from one of any typical IDE, graphics editor and other apps. A TestMace project is stored in the file system, and due to a human-readable format it allows to monitor changes using the version control system.</p>
<p>The project tree is located on the top of the sidebar, and a temporary project is created in $AppData/tmp-project directory during the first run and after creating a new project ($AppData depends on your OS). The project can be saved in any other directory, if necessary (use the File menu actions). In our example the project tree looks like this:</p>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/01/image3-1.png"><img class="alignnone size-full wp-image-8206" src="https://testmace.com/blog/wp-content/uploads/2019/01/image3-1.png" alt="" width="312" height="726" srcset="https://testmace.com/blog/wp-content/uploads/2019/01/image3-1.png 312w, https://testmace.com/blog/wp-content/uploads/2019/01/image3-1-129x300.png 129w" sizes="(max-width: 312px) 100vw, 312px" /></a></p>
<p>Note that at the moment all nodes are runnable. It means that:</p>
<ol>
<li>When running the RequestStep node, the pre-configured request is sent.</li>
<li>When running the Folder and Project nodes, all nested nodes are run successively.</li>
<li>When running the Assertion node, this node&#8217;s assertions are executed.</li>
</ol>
<p>To understand our project better, let&#8217;s see the example. We&#8217;ll use <a href="https://github.com/typicode/json-server">this</a> project, that is deployed at <a href="https://testmace-stage.herokuapp.com">https://testmace-stage.herokuapp.com</a>. This open source project is a very convenient solution for client testing.</p>
<p>Here we are interested in the posts resource of the project. It fully supports CRUD, so let&#8217;s imagine we need to create the following scenario:</p>
<ol>
<li>Make a post with a certain title. Get the post with an id in response.</li>
<li>Check if the post with the given title was made.</li>
</ol>
<p>Let&#8217;s go. As we mentioned earlier, a Folder node is a great choice for grouping nodes. What is interesting about this Folder type, is that the nodes within it are run sequentially that allows to group them into scenarios.</p>
<p>Now add a folder &#8220;posts&#8221; to the project and then add a subfolder &#8220;create&#8221;. You can do it via the context menu of the chosen parent:</p>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/01/image2-1.png"><img class="alignnone size-full wp-image-8207" src="https://testmace.com/blog/wp-content/uploads/2019/01/image2-1.png" alt="" width="491" height="157" srcset="https://testmace.com/blog/wp-content/uploads/2019/01/image2-1.png 491w, https://testmace.com/blog/wp-content/uploads/2019/01/image2-1-300x96.png 300w" sizes="(max-width: 491px) 100vw, 491px" /></a></p>
<p>In our case, the project tree will be like this:</p>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/01/image7-1.png"><img class="alignnone size-full wp-image-8208" src="https://testmace.com/blog/wp-content/uploads/2019/01/image7-1.png" alt="" width="315" height="127" srcset="https://testmace.com/blog/wp-content/uploads/2019/01/image7-1.png 315w, https://testmace.com/blog/wp-content/uploads/2019/01/image7-1-300x121.png 300w" sizes="(max-width: 315px) 100vw, 315px" /></a></p>
<p>According to our scenario, we need to send a request for making the post first. This request is going to have the following parameters:</p>
<ul>
<li>URL <a href="https://testmace-stage.herokuapp.com/posts">https://testmace-stage.herokuapp.com/posts</a></li>
<li>POST Method</li>
<li>A Content-Type header with application/json value</li>
<li>The body {&#8220;title&#8221;: &#8220;My first TestMace post&#8221;}</li>
</ul>
<p>Well, let&#8217;s create a RequestStep node with these parameters. See what I&#8217;ve got:</p>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/01/image1-1.png"><img class="alignnone size-full wp-image-8209" src="https://testmace.com/blog/wp-content/uploads/2019/01/image1-1.png" alt="" width="1560" height="444" srcset="https://testmace.com/blog/wp-content/uploads/2019/01/image1-1.png 1560w, https://testmace.com/blog/wp-content/uploads/2019/01/image1-1-300x85.png 300w, https://testmace.com/blog/wp-content/uploads/2019/01/image1-1-1024x291.png 1024w" sizes="(max-width: 1560px) 100vw, 1560px" /></a></p>
<p>As you can see, the server says the post was created, but I want to check it to be sure.</p>
<p>Obviously, to do that we need to fetch this post by its id. So we are to make the following request:</p>
<ul>
<li>URL <a href="https://testmace-stage.herokuapp.com/posts/${id}">https://testmace-stage.herokuapp.com/posts/${id}</a></li>
<li>GET method</li>
</ul>
<p>But how do we get the id? We can do it using the default variable <span style="color: red;">$prevStep</span> and going back to the previous step. The full path to our id will be <span style="color: red;">$prevStep.$response.body.id</span>. So this is how our result request look like:</p>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/01/image6-1.png"><img class="alignnone size-full wp-image-8210" src="https://testmace.com/blog/wp-content/uploads/2019/01/image6-1.png" alt="" width="1627" height="447" srcset="https://testmace.com/blog/wp-content/uploads/2019/01/image6-1.png 1627w, https://testmace.com/blog/wp-content/uploads/2019/01/image6-1-300x82.png 300w, https://testmace.com/blog/wp-content/uploads/2019/01/image6-1-1024x281.png 1024w" sizes="(max-width: 1627px) 100vw, 1627px" /></a></p>
<p>As you see, the id was passed correctly. Now all we need is to add an Assertion node to check the scenarios automatically. In the previous article we showed you a quick way to create an Assertion node from a parsed response. Here&#8217;s a gif for it:</p>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/01/image4.gif"><img class="alignnone size-full wp-image-8211" src="https://testmace.com/blog/wp-content/uploads/2019/01/image4.gif" alt="" width="1999" height="632" /></a></p>
<p>Nice! We have created a scenario and a test. Now we just run the create folder (or any other parent, including the Project node) and we can run the scenario.</p>
<p>We have just one step left to make our project perfect. The thing is that &#8220;My first TestMace post&#8221; title can be seen in at least two places &#8211; in the first request and in the Assertion node. Copy and paste is never a good job, since if you want to change the post title, you are going to have to do that several times, and there is a chance that you can forget to change something.</p>
<p>This problem can be solved with the help of variables mechanism. Let&#8217;s define the title variable and use it in our nodes. We&#8217;d better do it in the create folder, as we&#8217;ll be able to use our variable in any child node, thanks to variable inheritance mechanism. As you homework, try to create and use this variable 🙂</p>
<p>One more thing to say here is that using this test, you can be confused to find a useless entry after its run. To avoid this side effect and test another functional part of your application you can</p>
<p>add one more RequestStep to your scenario that would send a request to delete a just created entry and additionally create a test that would check if the entry was deleted.</p>
<h3><strong>Project Storage</strong></h3>
<p>One of the benefits of TestMace is a human-readable format for storing your projects. Each node is stored in a separate folder or file. We use the <a href="https://yaml.org/">YAML</a> format for storing files.</p>
<p>Now I&#8217;ll show you how TestMace works with project files. In our project&#8217;s file system the directory hierarchy is the following:</p>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/01/image5-1.png"><img class="alignnone size-full wp-image-8212" src="https://testmace.com/blog/wp-content/uploads/2019/01/image5-1.png" alt="" width="219" height="143" /></a></p>
<p>As you see, the directory hierarchy is almost the same as the nodes hierarchy. Let&#8217;s look at how the Project node is stored. As we know, this is the root node of the project. In the file system it is stored in the index.yml in the Project folder. It looks like this:<br />
<pre><code class="yaml">type: Project<br />
name: Project<br />
environments:<br />
  active: null<br />
  environments: {}<br />
children:<br />
 - posts<br />
variables: {}<br />
authData:<br />
  type: inherit<br />
settings:<br />
  proxy:<br />
    enable: false<br />
version: '1'<br />
</code></pre>
Here are the fields we are interested in:</p>
<ul>
<li>type has the node type (Project, Folder, RequestStep или Assertion). All node type files have this field.</li>
<li>name has the node name.</li>
<li>children has an array of children and also defines their order.</li>
</ul>
<p>Other fields will be described after we state the main features, but their names speak for themselves.</p>
<p>Now we go on. The project node contains the posts node with the index.yml file in it, which format is pretty similar to one of the Project node.</p>
<p>See the create node as an example of variables storage. If you were successful in passing the &#8220;My first TestMace post&#8221; title to a create node&#8217;s variable, then you&#8217;ll see it in the file system: </p>
<pre><code class="yaml">children:<br />
  - create post<br />
  - check post<br />
variables:<br />
  title: My first TestMace post<br />
cookies: &#091;&#093;<br />
type: Folder<br />
authData:<br />
  type: inherit<br />
name: create<br />
</code></pre>
<p>Nothing special, just an ordinary key-value storage.</p>
<p>The RequestStep node has pretty much the same story with its storing &#8211; the node folder contains an index.yml file. This is how the file of the make-a-post request looks like:</p>
<pre><code class="yaml">children: &#091;&#093;<br />
variables: {}<br />
type: RequestStep<br />
requestData:<br />
  request:<br />
    method: POST<br />
    url: 'https://testmace-stage.herokuapp.com/posts'<br />
  headers: &#091;&#093;<br />
  params: &#091;&#093;<br />
  body:<br />
    type: Json<br />
    jsonBody: |-<br />
      {<br />
        "title": "${title}"<br />
      }<br />
    xmlBody: ''<br />
    textBody: ''<br />
    formData: &#091;&#093;<br />
    formURLEncoded: &#091;&#093;<br />
authData:<br />
  type: inherit<br />
name: create post<br />
</code></pre>
<p>No comments here, it seems obvious.</p>
<p>And the last node here to talk about is the Assertion node. It is stored as an yaml file in the parent RequestStep folder and has a corresponding to the project assertion node name. We have only one Assertion node in the project and it looks like that: </p>
<pre><code class="yaml">children: &#091;&#093;<br />
variables: {}<br />
type: Assertion<br />
assertions:<br />
  - disabled: false<br />
    type: compare<br />
    actualValue: '${$response.body.title}'<br />
    operator: equal<br />
    expectedValue: '${title}'<br />
name: Assertions<br />
</code></pre>
<p>Here we are interested in the assertions array. Each entry format in assertions is different and depends on the assertion type. However, disabled and type fields are shared. That&#8217;s it, there&#8217;s no need to describe other obvious things.</p>
<h3><strong>Conclusion</strong></h3>
<p>We did a great job today! We created a very common scenario and tested it. Note that you didn&#8217;t have to write any code here, but if you used another app you would have! This is what our purpose is. We want to create a powerful but at the same time simple tool for API testing. And I think, we&#8217;re halfway there, aren&#8217;t we? 😉</p>
]]></content:encoded>
			<wfw:commentRss>https://testmace.com/blog/2019/01/28/testmace-beta-features-overview-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TestMace beta. Features overview, part 1</title>
		<link>https://testmace.com/blog/2019/01/28/testmace-beta-features-overview-part-1/</link>
		<comments>https://testmace.com/blog/2019/01/28/testmace-beta-features-overview-part-1/#respond</comments>
		<pubDate>Mon, 28 Jan 2019 03:03:27 +0000</pubDate>
		<dc:creator><![CDATA[Dmitriy Snytkin]]></dc:creator>
				<category><![CDATA[TestMace]]></category>

		<guid isPermaLink="false">https://testmace.com/blog/?p=8215</guid>
		<description><![CDATA[Finally! We start our TestMace closed beta. This article is going to be the first in the series of articles about our product, its interface, its main features and benefits. Since we are still at the development stage, there might be some differences in the product shown in the article. Let&#8217;s start! Your First Launch...]]></description>
				<content:encoded><![CDATA[<p>Finally! We start our TestMace closed beta. This article is going to be the first in the series of articles about our product, its interface, its main features and benefits. Since we are still at the development stage, there might be some differences in the product shown in the article. Let&#8217;s start!</p>
<h3><strong>Your First Launch</strong></h3>
<p>Launching the product the first time, you will see:</p>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/01/image13.png"><img class="alignnone size-full wp-image-8216" src="https://testmace.com/blog/wp-content/uploads/2019/01/image13.png" alt="" width="1920" height="1053" srcset="https://testmace.com/blog/wp-content/uploads/2019/01/image13.png 1920w, https://testmace.com/blog/wp-content/uploads/2019/01/image13-300x165.png 300w, https://testmace.com/blog/wp-content/uploads/2019/01/image13-1024x562.png 1024w" sizes="(max-width: 1920px) 100vw, 1920px" /></a></p>
<p>Let&#8217;s look at each interface part closely.</p>
<p>You can see a toolbar at the top of the screen. So far you can do the following:</p>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/01/image9.png"><img class="alignnone size-full wp-image-8217" src="https://testmace.com/blog/wp-content/uploads/2019/01/image9.png" alt="" width="426" height="53" srcset="https://testmace.com/blog/wp-content/uploads/2019/01/image9.png 426w, https://testmace.com/blog/wp-content/uploads/2019/01/image9-300x37.png 300w" sizes="(max-width: 426px) 100vw, 426px" /></a></p>
<ol>
<li>Undo and Redo your actions. At the moment all actions on changing projects and nodes are supported (see below).</li>
<li>Work with cookies via the Cookies Dialog.</li>
<li>Configure and choose your environment.</li>
</ol>
<p>The main interface of the application is divided into two parts &#8211; a sidebar and a workspace. The sidebar has the top and bottom sections:</p>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/01/image20.png"><img class="alignnone size-full wp-image-8218" src="https://testmace.com/blog/wp-content/uploads/2019/01/image20.png" alt="" width="312" height="969" srcset="https://testmace.com/blog/wp-content/uploads/2019/01/image20.png 312w, https://testmace.com/blog/wp-content/uploads/2019/01/image20-97x300.png 97w" sizes="(max-width: 312px) 100vw, 312px" /></a></p>
<p>The top section is intended for working with the current project.</p>
<p>The project is a hierarchical set of nodes that are connected physically and logically within one directory. We&#8217;ll provide more details on working on the project in the next article.</p>
<p>There is also the Scratches panel on the sidebar, where temporary (or &#8220;quick&#8221;) user requests are saved.</p>
<p>And the final part of the interface &#8211; workspace &#8211; is right in the middle of the screen. Now it&#8217;s empty, but let&#8217;s create our first request to make it look better.</p>
<h3><strong>Node Types</strong></h3>
<p>A node is an entry in the scratches list or any element of the project tree. There are several node types:</p>
<ul>
<li><strong>RequestStep</strong>. This is a node that you can use to send a request. It can have only one Assertion node as a child element.</li>
<li><strong>Assertion</strong>. This one is used for writing tests. It can be a child node only for a RequestStep node.</li>
<li><strong>Folder</strong>. It allows to group Folder and RequestStep nodes under it.</li>
<li><strong>Project</strong>. This is a root node, that is created automatically when you start a new project. It is functionally identical to a Folder node.</li>
</ul>
<p>In Scratches you can create only RequestStep and Assertion nodes, while you can add any node types to the project and build hierarchical structure of any complexity. Moreover, using Folder nodes, you can even create request scenarios and test them via Assertion. This will be described below.</p>
<h3><strong>Our First Request</strong></h3>
<p>To create a request you need to click on +, that is right under the toolbar:</p>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/01/image11.png"><img class="alignnone size-full wp-image-8219" src="https://testmace.com/blog/wp-content/uploads/2019/01/image11.png" alt="" width="1062" height="75" srcset="https://testmace.com/blog/wp-content/uploads/2019/01/image11.png 1062w, https://testmace.com/blog/wp-content/uploads/2019/01/image11-300x21.png 300w, https://testmace.com/blog/wp-content/uploads/2019/01/image11-1024x72.png 1024w" sizes="(max-width: 1062px) 100vw, 1062px" /></a></p>
<p>Then you&#8217;ll see the request configuration interface, and a new entry will be added to the Scratches panel:</p>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/01/image8-1.png"><img class="alignnone size-full wp-image-8220" src="https://testmace.com/blog/wp-content/uploads/2019/01/image8-1.png" alt="" width="1914" height="999" srcset="https://testmace.com/blog/wp-content/uploads/2019/01/image8-1.png 1914w, https://testmace.com/blog/wp-content/uploads/2019/01/image8-1-300x157.png 300w, https://testmace.com/blog/wp-content/uploads/2019/01/image8-1-1024x534.png 1024w" sizes="(max-width: 1914px) 100vw, 1914px" /></a></p>
<p>Congratulations, you&#8217;ve just created a draft request! Now we only need to configure it. The TestMace request configuration interface is quite similar to one of other HTTP clients, so there&#8217;s no need to go into it now. Just note that the interface is visually divided into two parts: one for request configuration and another for viewing response results.</p>
<p>Let&#8217;s send a request. I use <a href="https://next.json-generator.com">https://next.json-generator.com</a> for testing, since it helps to create different JSON structures and enable access to them from the outside. Now, as we usually do, let&#8217;s say hello to this world and create a JSON like that:</p>
<pre><code >{<br />
     "action": "Hello",<br />
     "who": "World"<br />
}</code></pre>
<p>Create a link for it. I have this one <a href="https://next.json-generator.com/api/json/get/EJvQVEVGL">https://next.json-generator.com/api/json/get/EJvQVEVGL</a> Then paste it to the URL field and push the RUN button. The result should be the following:</p>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/01/image5-2.png"><img class="alignnone size-full wp-image-8221" src="https://testmace.com/blog/wp-content/uploads/2019/01/image5-2.png" alt="" width="1579" height="578" srcset="https://testmace.com/blog/wp-content/uploads/2019/01/image5-2.png 1579w, https://testmace.com/blog/wp-content/uploads/2019/01/image5-2-300x110.png 300w, https://testmace.com/blog/wp-content/uploads/2019/01/image5-2-1024x375.png 1024w" sizes="(max-width: 1579px) 100vw, 1579px" /></a></p>
<p>The app should say the request was successful and display brief statistics on the request execution time and response size. In the response panel you can see parsed and text (with or without highlighting) responses.</p>
<h3><strong>Variables</strong></h3>
<p>The Variables section is a key-value storage for storing and reusing some data. It is often used for removing code duplicates and improving readability: The greetingUrl variable says more than just the line https://next.json-generator.com/api/json/get/EJvQVEVGL for sure.</p>
<p>Variables mechanism is very well integrated to all application parts and has several features:</p>
<ul>
<li>Variables can store strings, arrays or objects.</li>
<li>Variables are defined for each node and are inherited from parent nodes.</li>
<li>Variables&#8217; values can refer to other variables.</li>
<li>Default variables names start with $. There are the following default variables:
<ul>
<li><span style="color: red;">$parent</span> &#8211; a reference to a parent node</li>
<li><span style="color: red;">$prevStep</span> &#8211; a reference to the previous node within a Folder node</li>
<li><span style="color: red;">$nextStep</span> &#8211; a reference to the next node within a Folder node</li>
<li><span style="color: red;">$env</span> &#8211; a reference to the environment variables (in terms of our application)</li>
<li><span style="color: red;">$response</span> (only for RequestStep and its children) &#8211; a reference to a response from the server.</li>
</ul>
</li>
</ul>
<p>There is the Variables button in every node interface, that opens the variables definition dialog.</p>
<p>It&#8217;s time we put all that into practice! First, we get back to our hello-world request and try to put the URL into a variable. As you remember, the URL is <a href="https://next.json-generator.com/api/json/get/EJvQVEVGL">https://next.json-generator.com/api/json/get/EJvQVEVGL</a>. Now open the variables configuration dialog and add a variable named greetingUrl having our URL as a value. This is going to look like this:</p>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/01/image14.png"><img class="alignnone size-full wp-image-8222" src="https://testmace.com/blog/wp-content/uploads/2019/01/image14.png" alt="" width="1097" height="427" srcset="https://testmace.com/blog/wp-content/uploads/2019/01/image14.png 1097w, https://testmace.com/blog/wp-content/uploads/2019/01/image14-300x117.png 300w, https://testmace.com/blog/wp-content/uploads/2019/01/image14-1024x399.png 1024w" sizes="(max-width: 1097px) 100vw, 1097px" /></a></p>
<p>Click OK and change the URL to our new variable. The syntax is: ${variableName}. In this case we&#8217;ll get:</p>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/01/image2-2.png"><img class="alignnone size-full wp-image-8223" src="https://testmace.com/blog/wp-content/uploads/2019/01/image2-2.png" alt="" width="761" height="58" srcset="https://testmace.com/blog/wp-content/uploads/2019/01/image2-2.png 761w, https://testmace.com/blog/wp-content/uploads/2019/01/image2-2-300x23.png 300w" sizes="(max-width: 761px) 100vw, 761px" /></a></p>
<p>Please note that the autocomplete feature is available for variables. This is how it works:</p>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/01/image3.gif"><img class="alignnone size-full wp-image-8224" src="https://testmace.com/blog/wp-content/uploads/2019/01/image3.gif" alt="" width="493" height="163" /></a></p>
<p>Besides, you can check what value your variable has at the moment. You just have to point to the variable!</p>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/01/image15.gif"><img class="alignnone size-full wp-image-8225" src="https://testmace.com/blog/wp-content/uploads/2019/01/image15.gif" alt="" width="493" height="105" /></a></p>
<p>Sending the request one more time, we can make sure that the URL value is successfully inserted from the variable.</p>
<h3><strong>Assertion Node</strong></h3>
<p>As mentioned above, this node is used for writing tests and can only be a child of a RequestStep node. There are two ways to add an Assertion node to your project:</p>
<ul>
<li>Right-click on the parent node in the sidebar</li>
</ul>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/01/image19.png"><img class="alignnone size-full wp-image-8226" src="https://testmace.com/blog/wp-content/uploads/2019/01/image19.png" alt="" width="378" height="217" srcset="https://testmace.com/blog/wp-content/uploads/2019/01/image19.png 378w, https://testmace.com/blog/wp-content/uploads/2019/01/image19-300x172.png 300w" sizes="(max-width: 378px) 100vw, 378px" /></a></p>
<ul>
<li>In Assertions tab on the response panel</li>
</ul>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/01/image17.png"><img class="alignnone size-full wp-image-8227" src="https://testmace.com/blog/wp-content/uploads/2019/01/image17.png" alt="" width="773" height="231" srcset="https://testmace.com/blog/wp-content/uploads/2019/01/image17.png 773w, https://testmace.com/blog/wp-content/uploads/2019/01/image17-300x90.png 300w" sizes="(max-width: 773px) 100vw, 773px" /></a></p>
<p>We&#8217;ll go with the second option. Click CREATE NEW ASSERTION NODE and an Assertion node will be added as a child node, and the interface will be changed to the add-assertion interface.</p>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/01/image6-2.png"><img class="alignnone size-full wp-image-8228" src="https://testmace.com/blog/wp-content/uploads/2019/01/image6-2.png" alt="" width="312" height="113" srcset="https://testmace.com/blog/wp-content/uploads/2019/01/image6-2.png 312w, https://testmace.com/blog/wp-content/uploads/2019/01/image6-2-300x109.png 300w" sizes="(max-width: 312px) 100vw, 312px" /></a></p>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/01/image4-1.png"><img class="alignnone size-full wp-image-8229" src="https://testmace.com/blog/wp-content/uploads/2019/01/image4-1.png" alt="" width="386" height="129" srcset="https://testmace.com/blog/wp-content/uploads/2019/01/image4-1.png 386w, https://testmace.com/blog/wp-content/uploads/2019/01/image4-1-300x100.png 300w" sizes="(max-width: 386px) 100vw, 386px" /></a></p>
<p>Assertion in the assertion node is just a conditional check. Let&#8217;s suppose we need to check if the server responds &#8220;Hello&#8221; in the action field. So far the assertion list is empty, let&#8217;s add our first test. Click on ADD ASSERTION and you&#8217;ll see the Assertion node interface. There is a template for an assertion:</p>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/01/image12.png"><img class="alignnone size-full wp-image-8230" src="https://testmace.com/blog/wp-content/uploads/2019/01/image12.png" alt="" width="1582" height="560" srcset="https://testmace.com/blog/wp-content/uploads/2019/01/image12.png 1582w, https://testmace.com/blog/wp-content/uploads/2019/01/image12-300x106.png 300w, https://testmace.com/blog/wp-content/uploads/2019/01/image12-1024x362.png 1024w" sizes="(max-width: 1582px) 100vw, 1582px" /></a></p>
<p>Let&#8217;s have a closer look at the interface. Each assertion has a type. There are 4 assertion types:</p>
<ol>
<li><strong>Compare values</strong> &#8211; it simply compares two values. We have several comparison operators: &#8220;equal to&#8221;, &#8220;not equal to&#8221;, &#8220;greater than&#8221;, &#8220;greater than or equal to&#8221;, &#8220;less than&#8221;, &#8220;less than or equal to&#8221;.</li>
<li><strong>Contains value</strong> &#8211; checks if a substring is present in a string.</li>
<li><strong>XPath</strong> &#8211; checks if there is a certain value in XML via selectors.</li>
<li><strong>JavaScript assertion</strong> &#8211; a random JavaScript script that returns true on success and false on failure.</li>
</ol>
<p>As you can see all inputs use variables mechanism as well.</p>
<p>Okay, let&#8217;s get back to our little project. Action field value can be received by response using response.body.action. We expect to receive the value &#8220;Hello&#8221;. So our assertion looks like that:</p>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/01/image16.png"><img class="alignnone size-full wp-image-8231" src="https://testmace.com/blog/wp-content/uploads/2019/01/image16.png" alt="" width="741" height="414" srcset="https://testmace.com/blog/wp-content/uploads/2019/01/image16.png 741w, https://testmace.com/blog/wp-content/uploads/2019/01/image16-300x168.png 300w" sizes="(max-width: 741px) 100vw, 741px" /></a></p>
<p>Fine. Click RUN for a test run. If it is successful, our assertion will be highlighted in green, if not &#8211; in red. If you do everything right, you&#8217;ll definitely see green color.</p>
<p>TestMace can also correct errors. Don&#8217;t you believe in magic? Just watch those hands 😉 Let&#8217;s change &#8220;Hello&#8221; in the expected value field to &#8220;Bye&#8221;, for example. After the run the system says that the values are not equal:</p>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/01/image1-2.png"><img class="alignnone size-full wp-image-8232" src="https://testmace.com/blog/wp-content/uploads/2019/01/image1-2.png" alt="" width="1533" height="475" srcset="https://testmace.com/blog/wp-content/uploads/2019/01/image1-2.png 1533w, https://testmace.com/blog/wp-content/uploads/2019/01/image1-2-300x93.png 300w, https://testmace.com/blog/wp-content/uploads/2019/01/image1-2-1024x317.png 1024w" sizes="(max-width: 1533px) 100vw, 1533px" /></a></p>
<p>As you might have noticed, the Disable Errors and Fix Errors buttons are active (the same happens when you point to the assertion):</p>
<ul>
<li>Disable Errors disables the assertion, so it will not be executed in the following runs.</li>
<li>Fix Errors fixes errors. Fixing errors behaviour depends on the chosen assertion type, and sometimes to fix error is not possible.</li>
</ul>
<p>Click the Fix Errors button&#8230; and voila! The value has been transfered from response to expected value. If you run it again, the test will be successful.</p>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/01/image7-2.png"><img class="alignnone size-full wp-image-8233" src="https://testmace.com/blog/wp-content/uploads/2019/01/image7-2.png" alt="" width="1533" height="472" srcset="https://testmace.com/blog/wp-content/uploads/2019/01/image7-2.png 1533w, https://testmace.com/blog/wp-content/uploads/2019/01/image7-2-300x92.png 300w, https://testmace.com/blog/wp-content/uploads/2019/01/image7-2-1024x315.png 1024w" sizes="(max-width: 1533px) 100vw, 1533px" /></a></p>
<p>In conclusion, I&#8217;d like to show you one more nice feature, that allows to quickly create assertions. In TestMace you can create an assertion right from a received response. Just right click on the response field and choose an appropriate assertion from the context menu.</p>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/01/image18.png"><img class="alignnone size-full wp-image-8234" src="https://testmace.com/blog/wp-content/uploads/2019/01/image18.png" alt="" width="519" height="277" srcset="https://testmace.com/blog/wp-content/uploads/2019/01/image18.png 519w, https://testmace.com/blog/wp-content/uploads/2019/01/image18-300x160.png 300w" sizes="(max-width: 519px) 100vw, 519px" /></a></p>
<p>Then the fully configured assertion is created and you just have to click the RUN button.</p>
<p><a ref="magnificPopup" href="https://testmace.com/blog/wp-content/uploads/2019/01/image10.png"><img class="alignnone size-full wp-image-8235" src="https://testmace.com/blog/wp-content/uploads/2019/01/image10.png" alt="" width="1527" height="418" srcset="https://testmace.com/blog/wp-content/uploads/2019/01/image10.png 1527w, https://testmace.com/blog/wp-content/uploads/2019/01/image10-300x82.png 300w, https://testmace.com/blog/wp-content/uploads/2019/01/image10-1024x280.png 1024w" sizes="(max-width: 1527px) 100vw, 1527px" /></a></p>
<h3><strong>Conclusion</strong></h3>
<p>In this article we described the main features of the interface, as well as configured a request and tested it. However, that is just a tiny piece of all that TestMace can do. We&#8217;ll focus on another features in the next articles. Stay tuned 🙂</p>
]]></content:encoded>
			<wfw:commentRss>https://testmace.com/blog/2019/01/28/testmace-beta-features-overview-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why we have chosen Electron</title>
		<link>https://testmace.com/blog/2019/01/15/why-electron/</link>
		<comments>https://testmace.com/blog/2019/01/15/why-electron/#respond</comments>
		<pubDate>Tue, 15 Jan 2019 07:51:26 +0000</pubDate>
		<dc:creator><![CDATA[Dmitriy Snytkin]]></dc:creator>
				<category><![CDATA[TestMace]]></category>

		<guid isPermaLink="false">https://testmace.com/blog/?p=8195</guid>
		<description><![CDATA[In the last article we made a short introduction of our product. Today I&#8217;d like to tell you why we chose Electron for building our application. Why Desktop The web has been growing rapidly for the past 10-15 years. We stumble upon new tools for creating more functional and complex web applications every now and...]]></description>
				<content:encoded><![CDATA[<p>In <a href="https://testmace.com/blog/2018/12/19/team_introduction/">the last article</a> we made a short introduction of our product. Today I&#8217;d like to tell you why we chose Electron for building our application.</p>
<h3><strong>Why Desktop</strong></h3>
<p>The web has been growing rapidly for the past 10-15 years. We stumble upon new tools for creating more functional and complex web applications every now and then. There even exist specific programming languages for web development that virtually  have no ready solutions for other fields . In our everyday life we have already partially replaced Microsoft Office and Thunderbird with Google Docs and Gmail interface.</p>
<p>However the web can&#8217;t yet completely drive desktop out for a number of reasons:</p>
<ul>
<li>Low web applications responsiveness. It may be caused by either client-server synchronization or poor Internet connection or single-threaded JavaScript or simply your resource hungry browser if your machine is not powerful enough. It should be noted that the problems mentioned above are to be solved, it&#8217;s just a matter of time. Web workers, in particular, are already <a href="https://caniuse.com/#search=webworker">supported</a> by all modern browsers that partially deal with the multithreading problem, and features like <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer">SharedArrayBuffer</a> allow to reduce memory copy overhead between the main thread and workers.</li>
<li>Accessing local system resources. There are certain application classes (file managers, tweakers, daemons, and services) that can&#8217;t be implemented as web-applications (at least at the current state of their development).</li>
<li>Restricted browser features. For instance, networking is restricted to sending http-request and web-sockets connection only. Lower-level things like tcp, upd-requests are unavailable.</li>
<li>Intentional browser restrictions in terms of security. CORS, working with cookies, headers restrictions.</li>
<li>Limited set of languages and approaches. Unlike web-applications, which are only written in Javascript, for desktop applications it is allowed to use any language up to assembler to achieve efficient use of system resources with the help of multithreading and low-level instructions. One should note that the situation is being improved  &#8211; say hello to transpilers from some languages to JavaScript. Moreover, compilation to WebAssembly allows to transfer your code from other languages (C++, C#, Rust, etc.) and often to enjoy significant performance improvement.</li>
</ul>
<p>So, we can conclude that due to the above mentioned reasons TestMace should be a typical desktop application:</p>
<ul>
<li>We need to get access to the file system to work with projects.</li>
<li>Fetch restrictions do not allow us to get full control over configuring and sending requests.</li>
<li>We might need low-level optimizations to improve performance in the future.</li>
</ul>
<h3><strong>Choosing a Tech Stack</strong></h3>
<p>As we decided that our application should be a desktop one, we still need to choose the language and technologies we are going to use to implement it. As for the programming language, requirements are the following:</p>
<ol>
<li>It should be statically typed.</li>
<li>It should have huge and mature ecosystem: there should be both tried and tested libraries and IDE and other tools&#8217; support.</li>
<li>The majority of the team members must be familiar with the language.</li>
</ol>
<p>This is quite important. As a startup, we are interested in a fast product launch (in half a year), taking full advantage of internal team resources. Learning a new language and its ecosystem makes planning less predictable and may lead to certain mistakes in decision-making.</p>
<p>Nevertheless, the requirements don&#8217;t seem so strict, and some languages as C#, TypeScript, Go meet them. We&#8217;ll be choosing technologies taking into account if there are implementations in these languages.</p>
<p>It is way more exciting to choose software for user interface design. Requirements are the following:</p>
<ol>
<li>It should be multiplatform (Windows, Linux, MacOS)</li>
<li>A full set of build-in and external components</li>
<li>Customizable components</li>
<li>Markdown for interface description</li>
<li>Good support</li>
</ol>
<p>Now let&#8217;s look at some solutions that meet the requirements.</p>
<h4><strong>Qt (QML)</strong></h4>
<p>Qt is a powerful toolkit for creating multiplatform applications. The latest versions of this framework contain Qt Quick component for writing apps using the declarative markup language QML. QT in general and QML in particular &#8211; are battle-tested solutions, that are used in almost all software development fields &#8211; from embedded systems to operating system shells.</p>
<p>The main programming language of Qt is C++ (JavaScript can be used in QML). But still there are bindings to Qt and QML for other languages (<a href="https://github.com/qmlnet/qmlnet">here</a> is for C#). However, only integration with python is <a href="https://wiki.qt.io/Language_Bindings">officially</a> supported. Everything else is just a third party&#8217;s implementation. And surely you won&#8217;t base your application on the library, that was developed by a small team of enthusiasts in their spare time.</p>
<p>There also is <a href="https://github.com/BrigJS/brig">Brig</a> &#8211; NodeJS bindings for QML. What is so special about the project is its <a href="https://www.youtube.com/watch?v=D6CnZfK723M">impressive demo</a>. Yet, as it often happens with open source projects, developers do not pay due attention to their product, so it is also out of the game.</p>
<h4><strong>GTK</strong></h4>
<p>This is a user interface design library, that initially was a part of the GIMP project and then became a separate project. There is the <a href="https://glade.gnome.org/">Glade</a> instrument for nice and easy UI development. The main language for GTK development is C, there are bindings for all <a href="https://www.gtk.org/language-bindings.php">popular languages</a> though. Besides, MonoDevelop &#8211; one of the most powerful IDE for C# development &#8211; was created with the help of <a href="https://github.com/mono/gtk-sharp">C# bindings</a>. Unfortunately, going deeper we see that the GTK# project got dusty &#8211; the last commit was in February, 2018, then &#8211; January, 2017 and 2016. One commit a year. It&#8217;s nothing, given <a href="https://github.com/GNOME/gtk">the main GTK repository</a> is being actively developed. So close&#8230;</p>
<h4><strong>Electron</strong></h4>
<p>There has been so much fuss about this framework. Some like it for opportunity to transfer parts of their web-applications to desktop, others &#8211; hate it for being so resource hungry. Both sides make sense. Electron uses Node.js and Chromium&#8217;s rendering library under the hood. Basically, you create a typical web-application and wrap it into an executable file, and every application comes with its own version of Node.js and Chrome.</p>
<p>There is only one major disadvantage &#8211; high (compared to other technologies) memory usage: a blank project takes 100-200 MB. Some would consider that to be a reason against the apps like that (hello, Skype). But let&#8217;s analyze the market. <a href="https://electronjs.org/apps">A lot of</a> popular applications are built using Electron (Slack, Skype, Discord, VSCode, Atom, Postman, Insomnia, etc.). Many of them are standards in their fields or are conquering users&#8217; hearts (VSCode and Insomnia, for instance). People just use the tools that are good at solving their everyday tasks and ignore some side effects. On the other side, machines are getting more and more powerful (at least, RAM <a href="https://techtalk.pcpitstop.com/2016/10/05/average-pc-memory-ram-continues-climb/">continues to climb</a>), and less clients complain that &#8220;Chrome eats all RAM.&#8221; In summary, we reckon high memory usage will be quite irrelevant if the product can do the job well enough.</p>
<p>The advantages of Electron are quite obvious:</p>
<ol>
<li>Some things from the web-application can be reused.</li>
<li>It is easier to find professionals in this sphere.</li>
<li>A proven workflow &#8216;designer &#8211; layout designer &#8211; developer&#8217; with plenty of useful tools for every stage.</li>
</ol>
<p>Another benefit of ours is that the team has substantial experience in front-end development.</p>
<p>We eventually decided to go for Electron as the main tool to develop our project. That also means we had to choose the TypeScript language for our application.</p>
<h3><strong>Conclusion</strong></h3>
<p>One of the main goals of the startup is the fast product launch, and, of course, we&#8217;d like to minimize the costs. This review was aimed at finding the tool that would help us in that. We believe, Electron is the best choice here. It&#8217;s been 3 months since we&#8217;ve started working on the project, and Electron still has no rivals. It seems we&#8217;re getting serious here 🙂</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://testmace.com/blog/2019/01/15/why-electron/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Testmace team introduction</title>
		<link>https://testmace.com/blog/2018/12/19/team_introduction/</link>
		<comments>https://testmace.com/blog/2018/12/19/team_introduction/#respond</comments>
		<pubDate>Wed, 19 Dec 2018 08:41:30 +0000</pubDate>
		<dc:creator><![CDATA[Alexander Isaev]]></dc:creator>
				<category><![CDATA[TestMace]]></category>

		<guid isPermaLink="false">https://testmace.com/blog/?p=8156</guid>
		<description><![CDATA[1. Motivation Dealing with API development and API testing, we played around with lots of different tools, as there are dozens of them these days. Some of them are quite good, powerful and beautiful indeed. Switching from one tool to another, we faced various problems and disadvantages, most of which we were able to solve....]]></description>
				<content:encoded><![CDATA[<h3><strong>1. Motivation</strong></h3>
<p>Dealing with API development and API testing, we played around with lots of different tools, as there are dozens of them these days. Some of them are quite good, powerful and beautiful indeed. Switching from one tool to another, we faced various problems and disadvantages, most of which we were able to solve. Despite this, we couldn&#8217;t help feeling that there is no perfect tool for us yet 🙂 Now while you are reading this, we are working on our wonderful tool for API development and testing! Our application will allow not only to quickly configure and send requests using powerful features, such as variables, scope, and data entry fields with highlighting and autocompletion of every single thing, but also to write autotests using a very nice and simple test builder. We are planning to create a tool that will prove useful to both developers and testers, helping to improve interaction among team members.</p>
<h3><strong>2. About the Product</strong></h3>
<p>In the very first version of the product we tried to lay the foundations for the future usability of the tool. For instance, we implemented the variables mechanism, that allows to define both global and node scoped variables. Variables help to store and reuse any data in any part of the app in the same way.</p>
<p><img class="wp-image-8165  aligncenter" src="https://testmace.com/blog/wp-content/uploads/2018/12/variables1.png" alt="" width="594" height="232" srcset="https://testmace.com/blog/wp-content/uploads/2018/12/variables1.png 960w, https://testmace.com/blog/wp-content/uploads/2018/12/variables1-300x117.png 300w" sizes="(max-width: 594px) 100vw, 594px" /></p>
<p><img class="wp-image-8171 size-full aligncenter" src="https://testmace.com/blog/wp-content/uploads/2018/12/variables2.png" alt="" width="593" height="220" srcset="https://testmace.com/blog/wp-content/uploads/2018/12/variables2.png 593w, https://testmace.com/blog/wp-content/uploads/2018/12/variables2-300x111.png 300w" sizes="(max-width: 593px) 100vw, 593px" /></p>
<p>This mechanism provides an opportunity to work with complex scenarios, that might be useful in automated use case testing, as well as in performing non-standard authorization and other things. In our application it is possible to create scenarios like these by grouping certain requests and running them automatically, referring in every new request to the results of the previous ones and using any described entities with entities reference.</p>
<p><img class="wp-image-8170 size-full aligncenter" src="https://testmace.com/blog/wp-content/uploads/2018/12/rungroup1.gif" alt="" width="1368" height="618" /></p>
<p>Syntax highlighting and autocomplete feature help while working with variables. Every text box is equipped with these to significantly improve usability and make the process of configuring requests faster.</p>
<p><img class="wp-image-8166 size-full aligncenter" style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;" src="https://testmace.com/blog/wp-content/uploads/2018/12/autocomplete1.gif" alt="" width="722" height="157" /></p>
<p><img class="wp-image-8167 size-full aligncenter" src="https://testmace.com/blog/wp-content/uploads/2018/12/autocomplete2.gif" alt="" width="722" height="198" /></p>
<p>We also paid considerable attention to the Undo/Redo function. We made it work in different parts of the application. For example, you can undo the changes you made in a particular request or even in the project file structure. One of the most important features of the tool is the project storage format. Your requests and scenarios structure mirrors the project structure in the file system, and there is a special format for requests and tests, that are stored in separate YAML files. This is for developers and testers to work together on the same project, using the version control system and tried and tested in developers&#8217; environment code review practices.</p>
<p><img class="wp-image-8169 size-full aligncenter" src="https://testmace.com/blog/wp-content/uploads/2018/12/git1.gif" alt="" width="1368" height="618" /></p>
<p>For this purpose they will be advised to use special import/export mechanisms to support some standard formats, that you can find in other popular tools. Moreover, the Share button will help quickly send your configured request to a colleague. You can also choose from different automation testing strategies: either use a graphical test generator or write your own Javascript test with your favoriteJavascript libraries.</p>
<p><img class="wp-image-8168 size-full aligncenter" src="https://testmace.com/blog/wp-content/uploads/2018/12/createassertion.gif" alt="" width="1341" height="744" /></p>
<p>In addition, we are planning to implement such great features as API import with Swagger and WSDL support and automated test generation based on API documentation. First, we&#8217;ll deal with smoke, boundary and security tests generation, then hope to suggest a solution for more complex test.</p>
<h3><strong>3. Our Team</strong></h3>
<p>Our team is our pride and the main achievement. Each of us is a professional software developer, having solid experience in the field. Our knowledge and desire to make our work and work of our colleagues more convenient are pushing us to improve our product faster.</p>
<h3><strong>4. Future Plans</strong></h3>
<p>The main goal for us today is to release a beta version of the product. I suppose, the first is going to be a closed beta, so we&#8217;d appreciate if you could try a new tool out in your work and help us with your feedback. You can become a beta tester here: beta.testmace.com. We are starting our closed beta in January, 2019. The following two months will be devoted to analyzing your comments and suggestions to present our tool to the community in April. We realize though, that our tool is short of some features that might seem essential for the great part of users. For instance, in the first version of the tool team members can work on tests and scenarios together only by using the version control system. Solutions like this allow us to get a prompt feedback, providing enthusiasts with flexibility and letting them solve day-to-day problems right now. Our global plans include considering the whole API life cycle, expanding our tool functionality, and creating new tools for API documentation, monitoring and testing.</p>
<h3><strong>5. Our Message to You</strong></h3>
<p>For us professional software developers and QA engineers are the most valuable source of knowledge for defining requirements and implementing functionality of our product. We suggest you take part in its development. For this, we create and introduce special tools, such as the feature request system with a voting function, the public bug tracker with a participants motivation system, and so on. Your name will also be displayed in our acknowledgments section 🙂 And don&#8217;t hesitate to email us your comments and suggestions at beta@testmace.com. Make sure to follow us on social media:</p>
<ul>
<li><strong>Instagram:</strong> <a href="https://www.instagram.com/testmace/">https://www.instagram.com/testmace/</a></li>
<li><strong>twitter:</strong> <a href="https://twitter.com/testmace_soft">https://twitter.com/testmace_soft</a></li>
<li><strong>facebook:</strong> <a href="https://www.facebook.com/testmace/">https://www.facebook.com/testmace/</a></li>
</ul>
<p>Thank you in advance!</p>
]]></content:encoded>
			<wfw:commentRss>https://testmace.com/blog/2018/12/19/team_introduction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
