Testlink - creating test cases - testlink

Hello I have a problem once I want to create a test case in testlink. I'd like to create step to the test case but on the screen on the right I don't have anything only message:Your search delivered no results! how can I fix it?

Related

Best way to setup test cases that are "late" in a process

Best way of handling many test cases needing to navigate to a particular place before they run their asserts? For example a process has 5 steps and a test case needs to test a part of step 5, how can I set it up? Call the test case methods of the previous steps inside this test case, and do that for all test cases that test step 5?
Similarly, if a test case goes deep into the website - through many pages - should that navigation be re-written for every test case, or just call some test that already does that?
Any tips on this situations?
Best way of handling many test cases needing to navigate to a particular place before they run their asserts? For example a process has 5 steps and a test case needs to test a part
of step 5, how can I set it up?
I would create a Transporter class / pattern that the test case can call to get to that state. That will make the navigation code reusable to other tests and not make the test too big/complicated. You can also use the setUp() methods in your xUnit testing frameworks which will be called before each test and place the navigator code there, if you need to use it for other tests.
Similarly, if a test case goes deep into the website - through many
pages - should that navigation be re-written for every test case, or
just call some test that already does that?
I would extract that code into a helper class called Transporter and have the tests call it to easily navigate to the deep page in one method call.
I wrote about this and other test design patterns in a conference paper at the Pacific Northwest Software Quality Conference. Look for the Transporter pattern in that paper.
Here's an example using a Transporter class where you have to login and navigate to the checkout page:
public class Transporter {
public static void login() {
//App specific code to navigate to login screen and login to the application
}
public static void gotoCheckout() {
//App specific code to navigate to the checkout page
}
}
Now your tests can just call this Transporter class to do the navigation for them.
If you are using BDD, such as JBehave (not sure if Cucumber has the same feature) where you have the Given, When, Then story (feature) structure in Gherkin syntax, you can actually use "GivenStories" feature which are like prequel test cases to set you up for your specific test case, exactly as you are describing.
There's nothing wrong, however, when using BDD to simply make multiple step scenarios leading up to the particular test case, i.e. first scenario logs-in, second scenario navigates to certain page, third scenario performs your actual test.
By writing it as a separate story (feature), however, you can re-use those as "GivenStories" in JBehave as a shortcut to get where you need to be without duplicating the steps.

How to get and assign values in current activity by getting values from previous activity using intent in Espresso Junit test case?

I want to assign some values in my current activity by getting values from my previous activity using intent. I'm new to espresso, I do not how to achieve this using Espresso JUnit test case. Could you please suggest me an idea pass intent values from one activity to another activity using JUnit test case in espresso. Thanks in Advance.

How to update fixture column in Rails Minitest

How can i update column of a fixture for temporary use only with update_column command.
Right now i have following command that is running fine:
name = names(:one)
role = roles(:one)
name.role_id = role.id
assert name.save
And it is running fine, but is there any efficient way to do it in one line something like name.update_column(---, ----) ?
Thanks #richfisher for your answer, later on i figure out another way to do it. update_attributes is not a good idea to be used in test, because the problem with update_attributes is
It runs callbacks and validations
and usually we do not want to run these things in test cases
Instead of update_attributes we can use update_column like this
name.update_column(:role_id, roles(:one).id)
The advantage of using update_column is
It did not run callbacks and validations
name = names(:one)
name.update_attributes(role_id: roles(:one).id)

Dropdown Component Unit Test Case using in sinon+chai : ng-forward

I want to write the unit test case for this component Dropdown Component
But I am unable to write the test case in sinon+chai using ng-forward.
Can somebody guide me in this.

Link Test to TestCase WorkItem

I’d like to know if there is a way to really link the test of a build, with a test case WorkItem.
I've seen that you can attach the result of a test to a test case, but I want the test (method) to be linked to the test case, not the result.
I’m using Report Builder, where I show the list of test result of a build. The thing is, the name of each tests comes from the methods name. I’d prefer to use the name of the test case.
You cannot link a part of code (in this case a test method) to an work item (in this case a test case).