Requirements ( Functional , non-functional and user requirements) - requirements

can you please provide examples on requirements of the type ( functional , non-functional and user requirements ) of a website social network ( lets say the facebook ) ?
thanx in advance

Here are some examples for what requirements should be like for Facebook. However it's worth a warning: there isn't a single, agreed definition for what each type of requirement is, so I've given a definition for you I've chosen for each case.
I'm sure all of these can be improved in one way or another, but I feel these are decent requirements.
User Requirements
High level requirements that describe what a user can achieve. These are the needs that the system fulfil, similar to business requirements
U1. Users can post a textual update of their current mood or status.
U2. Users can choose whether the post described in U1 is shared with Friends, Everyone, or Nobody other than themselves.
U3. Users are presented with a list of posts made by people they are friends with or posts that are made to Everyone (see U2).
U4. The posts that appear in the lists U3 are filtered to only contain those that the user will find relevant or interesting
U5. The posts that appear in the lists U3 are ordered so that those the user will find highly relevant, and have not been seen previously by the user are towards the top of the list.
Function Requirements
Functional requirements provide highly specific details that allow designers, developers and testers to create a system to meets precise specifications. I've mapped them to user requirements from above
F1. Posts can be 63,206 characters long. [ref U1]
F2. Posts can be contain unicode characters. [ref U1]
F3. Posts may not contain any any of the following formatting, other than what can be provided by unicode characters - bold, strikethrough, underline [ref U1]
F4. 80% or more of posts in a users' post list (U3) should be from their friends. The remaining posts can be public posts or sponsored posts.
Non Functional Requirements
qualities and characteristics of the system that are not features. Again can be mapped to user or functional requirements
N1. After submitting a post through the web interface (see U1), it will be available to appear to in other users' lists of posts (see U3) within 30 seconds for 90% of posts.
N2. An update to a users list of posts (either the initial view of a list, or an extension to the list when scrolling to the bottom) appears in 3 seconds for 90% of users.
N3. 50% of users can post a status update within 1 minute of starting to try and post without having used the application before or receiving help.

Related

Is there a way to add a "no-readers" field to a Lotus Notes document?

In Lotus Notes/Domino, we have the functionality of Readers fields, which I know all about. These say who CAN see a document. I would like to know if there is some way (may be undocumented) where you can have that type of thing that says specifically who CANNOT see a certain document.
We have an application for HR, and some of the documents in there reflect negatively about certain people (complaints, for example) and everyone who has access to the database currently can see every document. I would like to hide this type of document from that specific person. I have not enacted any Readers fields on any documents in question.
It would be really nice to have a way to keep that current setup, but insert a factor of who to HIDE the document from like Readers fields do.
I know there are undocumented features people have learned about over the years, and wondered if anyone knows of such a thing that I can use.
Create a role called [ReadAll].
Create a Group called HR Readers and one called HR Restricted.
Add the people who can't read documents to the HR Restricted group. Add all others to HR Readers.
Add these two groups to the ACL and give the HR Readers group the [ReadAll] role.
Add a readers field that is computed to "[ReadAll]" on the documents you want to prevent the people in the "HR Restricted" group to not see.
No, there is no feature that does what you want. Not on a user-by-user basis. You can play with groups and roles, as suggested by Rob Mason, but those groups and roles have to be pre-determined. We asked for Non-Readers fields (at least) 20 years ago so that we could do what you want, but Iris, Lotus, IBM, and HCL never did it. I presume that either (a) it's hard, or (b) there isn't enough demand. Or both.
To hide content from specific people, you can use hide-when formulas within a form. I.e., the hide-when formula on one or more sensitive fields would be set to
#isMember(#UserName; RestrictedUsers)
where RestrictedUsers is a field that contains the list of people who cannot see the data in the fields.
But this is not real security. A user can see the document in views, and can see the hidden fields by bringing up the document properties dialog, or with a tool like NotesPeek. If you're talking about a Domino web app, and users don't have Notes clients and you have strictly-managed desktops so you are sure that is the case+, then it kind of sort of works. Admins and developers, though, would probably have the clients and would be able to see fields in documents that they're not supposed to.
I believe if I simply compute a Readers field to say something like:
whoToHideFrom:="John Smith/org";
#Name([ABBREVIATE];#Username) != whoToHideFrom
I will try this and mark this as successful or not successful after I test it

Non functional requirements and functional requirement example

I am analyzing Milk teas management website, that is a web online to help user buys via online and seller can manage their products, orders
I have to do Non-functional requirements and functional requirements for this website like this
FUNCTIONAL REQUIREMENTS
Register
Login
Add products to card
Submit order
Cancel order
NON - FUNCTIONAL REQUIREMENTS
Number of milk tea can be added to the cart
I am right for that? Can you give me some idea for this to let me improve better, I am new for this section, thank you so much
Functional Requirements
Good functional requirements should clearly describe the behavior of the system. Here are some examples:
"If the user enters the wrong password 3 times when signing in, the account shall be locked for 24h."
"When an electronics product is added to the cart, the user shall be presented with an option to purchase a warranty."
"If a user attempts to cancel an order after it has been processed, the user must specify the reason for the cancellation, which must be approved before a refund is issued"
If you want to add more functionality, create more requirements, don't pile them all into one. For example, the last requirement in the above list can be split into 2: (1) require cancellation reason, (2) approval before refund. It also helps to organize requirements by feature in spreadsheets (one row per requirement) or JIRA Stories, for example.
Make sure you read many examples of well-written requirements, and practice. Follow a checklist, and have a co-worker review your work. Always ask yourselves how you would test each requirement. If you can't figure out how to write a test for the requirement, how can you ever prove the product works as intended?
Non-Functional Requirements
Non-functional requirements are also known as "quality attributes" or "constraints" of the system. The range of possible items that can be added to a cart (0..max) seems like a constraint on that field, so I can see how some would consider this a NFR. But how would you test it?
Instead, you can express this like a functional requirement: "When the user enters a value that is greater than the maximum, display an error message". A NFR might describe the color, size and location of the error message. NFRs can also specify which UI kit to use and style guidelines to follow. For example, "Must follow Google Material Design" (https://material.io).
You should also be familiar with NFR categories (also known as the "ilities"):
Performance
Stability
Reliability
Scalability
Flexibility
Usability
Testability
Traceability/Auditability
Security
Compliance/Certification
Much More: https://en.wikipedia.org/wiki/Non-functional_requirement#Examples
Here are some examples of NFRs for a website:
Performance: "A new user account shall be created in less than 2000 ms"
Reliability: "The system shall have at least 99.9% availability"
Capacity: "The system shall service up to 1000 simultaneous users"
Scalability: "The system shall be horizontally scalable to increase the number of simultaneous users"
Usability: "Users should be able to navigate to any page in the site within 3 clicks"
References
Read these guidelines by the System Engineering Body of Knowledge (SEBoK). Follow them closely, share with your team:
https://www.sebokwiki.org/wiki/System_Requirements#Presentation_and_Quality_of_Requirements
This is an excellent book on large-scale agile requirements if you want to go deeper:
https://www.oreilly.com/library/view/agile-software-requirements/9780321685438/

Creating a SOLR index for activity stream or newsfeed

I am trying to index the activity feed of a social portal am building. The portal allows users to follow each other to get updates from the people they follow as an activity feed sorted by date.
For example, user A will be following users B, C, D, E & F. So user A should see all the posts from B, C, D, E & F on his/her activity feed.
Let's assume the post consist of just two fields.
1. The text of the post. (text_field)
2. The name/UID of the user who posted it. (user_field)
Currently, I am creating an index for all the posts and indexing the text_field & user_field. In scale, there can be 1,000,000+ posts. A user may follow 100s if not 1000s of users. What will be the best way to create an index for this scenario?
Should I also index a person followers, so that its quickly looked up and then pass it to a second query for getting the posts of all those users sorted by date?
What is the best way to query the index consisting of all these posts, by passing the UID of all the users that are followed? Considering this may be in 100's or more.
Update:
The motivation for using Solr for the news feed was mainly inspired by this detailed slide and my brief discussion with OpenSocial team.
When starting off with a social portal, Fan out on write seems an overkill and more expensive. However Fan out on read is better. Both the slide and the OpenSocial team suggested using a search backend for Fan out on read. The slide mentioned above also have data on how it helped them.
At present, the feed is going to be flat and only sort criteria will be the date(recency). We won't be considering relevance or posts from more closer groups.
It's kind of abstract, but I will do my best here. Based on what you mentioned, I am not sure if Solr is really the right tool for the job here. You can still have Solr for full text search, but I am not sure about generating a news feed from it in this scenario. Remember that although Solr is pretty impressive, it is a search engine. I will pretend that you will stick with Solr for the rest of the post, keep in mind that we are trying to put a square peg through a round hole here though.
Here are a few additional questions you should think about.
You will probably want to add a timestamp of the post to the data element
You need to figure out how to properly sort the results. Is it in order of recency? Or based on posts that the user is more likely to interact with?
If a user has 1000+ connections, would he want to see an update from every one of them in the main feed? Or should posts from a closer group of friends show up higher?
Here are some comments about your questions:
1) If you index person's followers, it may be hard to keep up. I am assuming followers are going to be changing often and re-indexing in this scenario would not really be practical.
2) That sounds more on par, but again, you need to figure out the sorting. You can get a list of connections for the user, then run a search for top posts from all of them.

Specifying login in Feature Setup of SpecFlow and Selenium

I have set up SpecFlow to execute a number of Selenium tests to test a website. This all works fine!
I am just considering if there might be room for some optimization on the structuring of the SpecFlow features.
All the scenarios in a specific feature should use the same login. This is something I have hardcoded in the StepDefinition using the [BeforeScenario()] hook at the moment, since I don't really wan't pollute the scenarios with login info. It isn't relevant for the test.
But at the same time, I would like to remove the hardcoded part, and move this into my feature.
My question is two part.
Can I specify login credentials in my feature description. Sort of like a Given:
Feature: As a user I want to be able to see my ongoing orders, and interact with them.
Given I am logged in with username abc and password xyz
Scenario: See list of ongoing order
Given I place an order
When I navigate to MyOrders page
Then I can see at least one order in the list
Is this good practice?
Does it make sense to do it like this, on the feature level I mean. The scenarios are not dependent on a specific order, and they would execute faster if I didn't need to log in for each scenario.
Thanks for your input.
For steps that are common to all scenarios in a feature you can use Backgrounds:
Feature: As a user I want to be able to see my ongoing orders, and interact with them.
Background:
Given I am logged in with username abc and password xyz
Scenario: See list of ongoing order
Given I place an order
When I navigate to MyOrders page
Then I can see at least one order in the list
Too much abuse of background steps can be a bad practice because it introduces coupling between your scenarios.
Another solution is to put the login part directly into your "I Place an order" step.
This will remove all the noise about login stuff since it's implicit that you need to log in to place an order.
I'd also suggest to call it "I've placed an order" instead of "I place an order".
Given steps are usually pre-condition that describes what happened prior using the functionnality (when steps)
When I first read your post, I thought of Dan North: Who's domain is it anyway? and that influences me to think that we should be trying to write our tests so that they stick to a single knowledge domain. As you talk about specific users and navigation and orders in a list, well its very like the example he gives in that your specification is crossing domains. This kind of leads me towards almost making your specification less specific, i.e. its not about navigating and checking a list, do you have an order or not!
Scenario: See list of ongoing order
Given I am logged in with username abc and password xyz
And I place an order
Then should have at least one order
I wanted to give you another example link, to a post I cant find, which talks about the benefits that a team has got by actually defining some example users and what value that gives their testing. So in your business domain you might have a user called Jack who will have placed a large order in the system, and another prospective client Jill with no orders. In this way tests such as
Given I am Jack
When I search for my orders
Then I will find 1
Given I am Jill
When I search for my orders
Then I will find 0
can guarantee that you are only testing your Search functionality, and less about getting the setup in place.
I'd also suggest that you have a look at Liz Keogh: Acceptance Criteria vs Scenarios who asserts that more general broad definitions are less valuable than very specific examples. (It is Specification By Example after all :-) )
So to answer your question, I think having the specified user is a good thing, but doing it how you are doing it is heading a very complicated route.
The scenario examples that are given are completely not in line with the Feature.
Feature: As a user I want to be able to see my ongoing orders, and interact with them.
Background:
Given I am logged in as John Doe
Scenario: This is taking to long
And I have placed an order more than 29 days ago
When I navigate to MyOrders page
Then I can see my order in the list
and I am able to cancel it
Scenario: Track package
And I have been notified my order has been send
When I navigate to MyOrders page
Then I can see my order in the list
and I am able to navigate to the postman's site and see its status
Scenario: Review item
And I have received my package
When I navigate to MyOrders page
Then I can see my order in the list
and I am able to review the item
Scenario: Contact Seller
And I have placed an order two weeks ago
When I navigate to MyOrders page
Then I can see my order in the list
and I am able to ask the seller what is going on
As you can see the When and the Then is starting to duplicate itself and you might want to consider tucking those away.

Travel/Hotel API's? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I am working on a large project involving creating a worldwide hotel database with rich data such as Addresses, Images, Descriptions, Policies, Coordinates, Facilities, Reviews, Local area descriptions and their amenities etc.
I am looking for a public hotel API where I can both retrieve the data and run (preferably RESTful) real-time queries for specific locations and available rooms, and where I can subsequently let my customers make bookings.
Can anyone share experience, knowledge and possible guidelines for such a project, which APIs are suitable and what are the best practices?
In my search for hotel APIs I have found only one API giving unrestricted open access to their hotel database and allowing you to book their hotels:
Expedia's EAN http://developer.ean.com/
You need to sign for their affiliate program, which is very easy.
You get immediate access to their hotel databases plus you can make availability/booking requests with several response options, including JSON, which is more convenient and lightweight than the (unfortunately) more widespread XML.
As you immediately access their API, you can start developing and testing, but still need their approval to launch the site, basically to make sure it provides the needed quality and security, which is reasonable.
They also offer "deep linking", i.e. you may customize your requests by adding parameters. Then if it sufficient for your purpose (for mine it is not), you don't even need to store their content on your server.
I have also signed for HotelsCombined program:
(link removed as this site doesn't seem to let me put more links)
However, they do not immediately allow you to use their API even for testing. From their answer:
"Apologies for the inconvenience caused, but it’s simply a business decision to limit access to our rich hotel content. Please kindly check back within the next 2-3 months, where we will be able to judge your traffic, and in turn judge your status on standard data feeds."
I have also signed for Booking.com affiliate program:
(link removed as this site doesn't seem to let me put more links)
Unfortunately, again, they limit access, from their answer:
"Please do note that, since there's a high amount of time and cost involved in the XML integration, we are only able to offer the XML integration to a small amount of partners with a high potential."
I did not explore Tripadvisor as they seem only to offer top 10 hotels and only as widgets, but most importantly for me, they wouldn't allow booking through them.
I've checked the hotelbase.org mentioned above, they have very extensive list but not as rich as by Expedia, also they don't seem to have images and don't allow booking either.
I've used the TripAdvisor API before and its suited me well. It returns, per destination, a list of top-rated hotels, along with options to retrieve reviews, photos, nearby restaurants and a couple other useful things.
http://www.tripadvisor.com/help/what_type_of_tripadvisor_content_is_available
From the API page (available API content) :
* Hotel, attraction and restaurant ratings and reviews
* Top 10 lists of hotels, attractions and restaurants in a destination
* Traveler photos of a destination
* Travelers' Choice award badges for hotels and destinations
To expand upon #nstehr's answer, you could also use Yahoo Pipes to facilitate a more granular local search. Go to pipes.yahoo.com and do a search for existing hotel pipes and you'll get the idea..
HotelsCombined has an easy-to-access and useful service to download the data feed files with hotels. Not exactly API, but something you can get, parse and use. Here is how you do it:
Go to http://www.hotelscombined.com/Affiliates.aspx
Register there (no company or bank data is needed)
Open “Data feeds” page
Choose “Standard data feed” -> “Single file” -> “CSV format” (you may get XML as well)
If you are interested in details, you may find the sample Python code to filter CSV file to get hotels for a specific city here:
http://mikhail.io/2012/05/17/api-to-get-the-list-of-hotels/
Update:
Unfortunately, HotelsCombined.com has introduced the new regulations: they've restricted the access to data feeds by default. To get the access, a partner must submit some information on why one needs the data. The HC team will review it and then (maybe) will grant access.
You could probably trying using Yahoo or Google's APIs. They are generic, but by specifying the right set of parameters, you could probably narrow down the results to just hotels. Check out Yahoo's Local Search API and Google's Local Search API
Check out api.hotelsbase.org - its a free xml hotel api
No images as of yet though
Try Tixik.com and their API there. They have a very different data that big players, really good coverage mostly in Europe and good API conditions.
After several days of searching found the EAN API - http://developer.ean.com/ - it is a very big one, but it provides really good information. Free demos, XML\JSON format. Looks good.