Hyperledger Explore "Register User" Fail - hyperledger

Can somebody explain me how the "Register User" function of Hyperledger Explorer works ? Does Affiliation stands for Organization ? Is it designed to create a new user on the network ( including public/priv keys etc ) ? On my side it doesn't work ...

"Register User" not yet fully implemented in the last version ... just need to wait the future one. Question can be closed

Related

Private comments in JIRA issues

I want to enable my team to add comments to issues that can only be seen by my team for the purpose of private conversations related to the issue. For example, to facilitate conversation about the technical requirements for fulfilling the request, or to allow new team members to comment "Hey Joe, I don't know how to do this, can you show me?", without the reporter being able to see those comments. I had this at a former employer, so I know it can be done, but I don't know how to set it up myself.
You can do this by setting the viewing restrictions while creating a comment. Your admin may also need to configure the comment visibility settings first.
I fixed this by creating a new Role of "Team Members", giving that Role the permissions to Comment, and then going into my project and defining that Role as my team's group. Now, when they comment they get the little open padlock icon under the comment that they can click and select "Team Members", and then only we can see the comment.

Within Jira automatically closing tickets with a link "Relates To"

I am looking for a way to have Jira automatically close our help desk tickets when our development tickets are closed. With Jira we have two projects DEV and HD (help desk). When we create a HD ticket we also create a corresponding DEV ticket that our developer commits code to. When we deploy we close the development ticket, but often the associated HD ticket is forgotten about (each HD ticket is linked to the corresponding DEV ticket by the issue link 'Relates To').
Is there something with workflow, a plugin, the REST API, or Jython that would give us the capability to automatically close the associated help desk ticket that is linked to the dev ticket? Is this something that would have to be custom done or is there already something out there?
Thanks!
The Script Runner add-on has a script to close issues in a certain state after some time. I would take that script and customize it to also test for linked issues where the link type is "Relates To" and the linked issues are closed. You can use Jython for that or groovy
~Matt

When to test what with Cucumber and Rails

As I am writing tests in Cucumber and Ruby on Rails, I keep asking myself this question. When do I test "how do I create X" vs "can X be created"
How do I create X seems to encompass testing the actual steps it takes for a user to create X, commonly through a form.
Such as navigate to the new page, click the "create X" link, fill out the form and click create and then see that X has been created.
The alternative, "can x be created", is whether the system, model and controller, handle the capacity to create X, aka are they wired up properly.
Do I usually test both of these scenarios? I just barely started writing a Question and Answer part to my side project, and couldn't decide whether to write the test something like (I have removed the backgrounds, they are kind of long)
When I click "Ask the seller a question"
And I fill out the form with a question and submit the form
Then I should see that the question has been created
And the user that posted the job has been notified
or should it be more like
When I ask the seller a question
Then I should see that the question has been posted
And the user that posted the job has been notified
The difference being whether I create it through a form or factory, correct? Where does Rspec come into play, I think it should be testing the "can X be created" and does that mean I shouldn't be using cucumber to test that?
I think i'm essentially looking at "What do I test with cucumber", but maybe i'm making this more complicated then it is but I am having trouble coming to the conclusion by myself. Any insight you have would be great.
The approach you described as "how do I create X" is better because you're taking user perspective for testing, which is imho more natural/popular for Cucumber.
Also, this approach is better from the documentation perspective -> you describe how something works and not "what's expected". So if you need an refreshment or there is a new developer on a project -> you or him can just read a scenario.
You can read a bit about user perspective testing here: http://www.businesstechnologyarticles.eu/testing-the-user-perspective-with-ruby-on-rails
I hope that helps.
Nowadays I would answer differently. The Cucumber scenarios should be more like 'can X be created' (I mean your second example) but use only Capybara in steps with very little of Ruby code, RSpec, FactoryGirl...
Since web_steps were removed from Cucumber you should not be tempted to write such steps:
When I click "Ask the seller a question"
And I fill out the form with a question and submit the form
This is a really bad approach.
The second example is much better
When I ask the seller a question
Then I should see that the question has been posted
And the user that posted the job has been notified
It is more about the general idea without going to details
but you should write mostly Capybara steps then which will have all the details about 'how do I create X'.
Example:
When(/^I ask the seller a question$/) do
click_link 'Ask the seller a question'
fill_in 'my_form', with: 'My question'
click_button 'Submit'
end
Then(/^I should see that the question has been posted$/) do
expect(page).to have_selector '.alert', text: 'New question has been posted.'
expect(page).to have_content 'Question: My question'
end

A "strange" (maybe "extreme" or "crazy") approach to test by using Cucumber

I am using Ruby on Rails 3.2.2, cucumber-rails-1.3.0, rspec-rails-2.8.1, capybara-1.1.2 and factory_girl-2.6.3. I have a Scenario that tests the user sign up like the following:
Scenario: I register an user
When I fill in "Name" with "Foo"
And I fill in "Email" with "foo_bar#email.com"
And I fill in "Password" with "test_password"
And I click button "Register"
Then I should be redirected to the homepage
and I am trying to state a new Feature (within a separated file) where to implement a Scenario that, by using a token, should test the signed up user confirmation process to be properly completed (note: in reality, this process involves an email message delivering but I do not want to test if that email was sent; just ignore it for this question). Since I would like to test exclusively the confirmation process, I thought to implement a new Feature/Scenario where to state something like Given I am a registered user for which to run the Scenario: I register an user.
Scenario: I confirm an user
Given I am a registered user # Here I would like to run the 'Scenario: I register an user'
When I go to the confirmation page
And I enter the confirmation token
Then ...
In few words, I thought to call an entire Scenario within another Scenario.
Even if I can use the FactoryGirl gem to "create"-"register" an user, I prefer to proceed with the above approach because I'd tests ("practically" speaking, those "represent" "invisible people" that, managed by the Selenium gem, open my browser and perform actions) to behave as much as possible like "real people" behave, and so those test steps to implicitly follow all "real" steps that should be made in reality in order to sign up a new user. By following this approach I can test whether or not the application "interiors" are properly working.
Is it a correct approach? If no, how could/should I proceed?
One of the principles of well designed tests is that you exercise a particular feature in all of its various forms, but beyond that presume it to be working within the context of other tests that are exercising other features. That is, once you've tested that users can register, you should not be re-testing the same thing unless you're testing it in a different way.
The phrasing "Given I am a registered user" is something that implies the user has already successfully registered. You shouldn't go testing registration at this point since that's outside the scope of the test you're trying to perform.
Each test should have a mandate and it should stick to it. If you don't limit yourself your tests will spiral into a uselessly inter-dependent mess where changing one thing requires changing every other thing hooked in to it.
The syntax to run a scenario within a step is:
Given /^I authenticate successfully$/ do
Given 'I am on the login page'
And 'I fill in "Email" with "eddie#hotmail.com"'
And 'I fill in "Password" with "secret"'
When 'I press "Login"'
Then 'I should see "Welcome"'
end
Final thoughts: In general, have your Feature file not have any "fill in" --- just have it describe the actions, and have your steps do the dirty work.

User specific user management

I'm working on a website where I would like to register paid users. These user will buy a subscription and be able to register a set number of users under this subscription. Once a user is registered I would like the user to be a moderator of sorts with the ability to create user accounts for access to the site under there subscription.
Most of the membership solutions I have found on-line are based around a singularly administrator managing all the users on a site. I would like a registered user to be able to generate user-names and passwords and administrate the users they have created. It is this linkage that I am finding difficult and am struggling to find article on the subject.
I have provided two tables below.
Option1: Add a table that simply contains the id of the users referenced to the user id who created this user
Userid firstname last
1 tim boo
2 jim foo
3 slim bar
Userid CreatorUserid
2 1
3 1
4 1
Option2: Add CreatorUserID to the users information to reference them to a specific user
Userid firstname last CreatorUserID
1 tim boo Null
2 jim foo 1
3 slim bar 1
Both solutions leverage the default MVC asp.net membership. I have used this as a base but I welcome any other suggestions as to methods of linking users to the user who created there profile. In the perfect world I would love find a similar code project or a tutorial to build a solution similar to this!
Essential I am looking for advice onto how to achieve such interaction and possibly some advice as to how to structure the database. I was attempting to use default asp.net MVC membership with as minimal customisation as possible but this may not be a good idea?
I would also welcome ideas on how to structure the database should I add a third or fourth tier to this solution i.e. "user A" creates "User B" and "user C" creates "User D" but "User E" is the manager of "user A" and "user C" and would like access all these users. Provisionally though if anyone has any ideas, articles, tutorials or code projects in mind that could help me with the first part of my question I would appreciate it!!!!
Decide on a structure similar to the default asp.net membership. Simply added a index table referencing user to user. It is sufficing as a solution in my current release.

Resources