Monday 20 June 2016

MOODLECLOUD

Guideline to Start Online Teacher Traing with MoodleCloud:

Introductions:
MoodleCloud makes it even easier to host elearning online. With MoodleCloud, there's no installing software on servers or performing maintenance and upgrades. And best of all, it's created by the people who run Moodle. Get your first look at all this cloud-based LMS has to offer, in this course with staff author Oliver Schinkten. Oliver covers creating a MoodleCloud account and building your first course in the cloud. He'll also take you on a test drive of a demo site on MoodleCloud, so you can see how courses look to students, parents, instructors, and administrators.
Leading learning management system today announced MoodleCloud, offering a cloud-hosting solution for teachers, trainers or anyone to effortlessly deploy Moodle as a learning environment, with zero installation or hosting charges.

Key features of the free MoodleCloud hosting platform include:

• Free hosting (supported by minimal advertising)
• Easy, instant signup using your mobile phone.
• Full version of Moodle with almost no limitations
• Always has the latest version, currently Moodle 2.9.1
• Up to 50 users and 200Mb disk space
• Unlimited courses, unlimited database size
• Integrated with BigBlueButton for video-conferencing - free!
• Ability to personalise and customise your Moodle site
• Available in over 100 languages with multilingual capability
• Full support enabled for Moodle’s official app - Moodle Mobile.

Tuesday 14 June 2016

SPECFLOW WITH VISUAL STUDIO

As software development becomes complicated, writing unit tests provides a protection against constant changes and modifications.
other alternatives to specflow:
you can also use other test engines, like MsTest, xUnit, MbUnit or NUnit.
SpecFlow tests are usually placed into one or more separate projects in project's solution.
SpecFlow aims to bridge the communication gap between domain experts and developers by binding business readable behaviour specifications.
to provide a pragmatic and frictionless approach.
specification is written using the Gherkin language.
Gherkin is a domain specific language that lets us describe how our applications should behave without having to explain implementation details.




Steps to work with visual studio:
1. create a class library project.

2. now goto tool-> update-> search specflow and install.

3. now goto tool -> nuget -> update -> search specflow and install.

4. after that right click on project -> add -> new item -> select sepcflow type feature
it's default name is "specflowfeature1steps" and then click ok(remember the color of the content for this feature file)

5. now right click on this feature to generate definition file.

6. now you will see the color of the feature file is changed. means definition file is generated which is regular c# file with binding attribute.

7. after right click on the feature you will pop up and then click generate.
which is by default select the address to save definition file.click to save.

8. Now its time to execute specflow test to do that click on test -> windows -> Test Explorer

9. Now open AppConfig and under specFlow tag write <unitTestProvider name="NUnit"/>
now save ,after that run tests if it gives "error for Nunit could not found" then goto nuget and install specflow.nunit package.


10. Now run test.



Syntax:
*Each Gherkin file begins with a Feature keyword. Feature defines the logical test functionality you will test in this feature file.
Feature: LogIn Action Test
Description: This feature will test a LogIn and LogOut functionality
Scenario: Successful Login with Valid Credentials
Given User is on Home Page
When User Navigate to LogIn Page
And User enters UserName and Password
Then Message displayed Login Successfully


*Background keyword is used to define steps which are common to all the tests in the feature file.
Feature: Add to Cart
This feature will test functionality of adding different products to the User basket from different flow

Background: User is Logged In

Scenario: Search a product and add the first result/product to the User basket
Given User searched for Lenovo Laptop
When Add the first laptop that appears in the search result to the basket
Then User basket should display with 1 item


* Data Driven Testing, which allows to automatically run a test case multiple times with different input and validation values.
* SpecFlow inherently supports Data Driven Testing using Scenario Outline.
* Scenario Outline – This is used to run the same scenario for 2 or more different set of test data.



11. And now add new folder named as "features" and add sceflow feature as "LogIn_Feature" and copy this code
Feature: Login_Feature
In order to access my account
As a user of the website
I want to log into the website

@mytag
Scenario: Successful Login with Valid Credentials
Given User is at the Home Page
And Navigate to LogIn Page
When User enter UserName and Password
And Click on the LogIn button
Then Successful LogIN message should display

Scenario: Successful LogOut
When User LogOut from the Application
Then Successful LogOut message should display

and then generate definition file after that run test.

12. After that next target is to test or run the feature file and in order to test the feature file:
Now we add SpecFlow Step Definition file:
A Step Definition file is a small piece of code with a pattern attached to it or in other words a Step Definition is a C# method in a class with an annotation above it.