From eb62cecdbbdcad3881333c13809682a7ae1dba12 Mon Sep 17 00:00:00 2001 From: Alpha-Centauri-00 Date: Mon, 15 Jul 2024 19:31:49 +0200 Subject: [PATCH 1/3] simple_readme --- README.md | 167 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 154 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 5dd2c70..9dcca6d 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,168 @@ - - # robotframework-DotNetLibraryBase [![PyPI - Version](https://img.shields.io/pypi/v/robotframework-dotnetlibrarybase.svg)](https://pypi.org/project/robotframework-dotnetlibrarybase) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/robotframework-dotnetlibrarybase.svg)](https://pypi.org/project/robotframework-dotnetlibrarybase) +[![License](https://img.shields.io/github/license/imbus/robotframework-dotnetlibrarybase.svg)](https://github.com/imbus/robotframework-dotnetlibrarybase/blob/main/LICENSE) +[![Downloads](https://img.shields.io/pypi/dm/robotframework-dotnetlibrarybase.svg)](https://pypi.org/project/robotframework-dotnetlibrarybase) + + +# Introduction +Welcome to the documentation for `robotframework-DotNetLibraryBase`. This library allows you to integrate .NET functionalities into Robot Framework test suites. + +### Features + +- Seamless integration with .NET libraries. +- Easy to use and configure. +- Supports various .NET functionalities out-of-the-box. + +### To get started, We need: + +
+ .NET 8.0 + + 1. Go to [official .NET download page](https://dotnet.microsoft.com/download). + 2. Download the installer for your operating system. + 3. Run the installer and follow the instructions. + 4. Run `dotnet --version` +
+ +
+ Python + + 1. Go to [official Python page](https://www.python.org/). + 2. Download the installer for your operating system. + 3. Run the installer and follow the instructions. + 4. Run `python --version` + +
+ +
+ Visual Studio Code (VS Code) + + 1. Go to [official Visual Studio Code](https://code.visualstudio.com/download). +
------ +
+ RobotCode Extension -**Table of Contents** + 1. Go to [official RobotCode](https://marketplace.visualstudio.com/items?itemName=d-biehl.robotcode). +
-- [Installation](#installation) -- [License](#license) +
+ C# Extension (optional) -## Installation + 1. Go to [official Marketplace](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp). +
+ +
+ C# Dev Kit Extension (optional) + + 1. Go to [official Marketplace](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit). +
+
+ +# Installation + +Create a new virtual environment and activate it (recommended) + +### Install dotnetlibrarybase ```console pip install robotframework-dotnetlibrarybase ``` -## License -`robotframework-dotnetlibrarybase` is distributed under the terms of the [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) license. +
+.NET PART + + + +## Create a Solution + +```sh +dotnet new sln -o . -n libraryname +``` +`Output:` +The template "Solution File" was created successfully. + + +## Create .NET Project: +Create a new folder called `src` and navigate into it: + +```sh +mkdir src +cd src +dotnet new classlib -n libraryname.example +``` +`Output:` +Build succeeded in 0.5s +Restore succeeded. + + +## Add Projects to solution: +`cd..` Back, to add new project to the solution. + +```sh + dotnet sln add .\src\libraryname.example\ +``` +`Output:` +Project 'src\libraryname.example\libraryname.example.csproj' added to the solution. + + +## Create C# function: +In `src` we have now `library.name`. lets add this function to `Class1.cs`. + +```c# +namespace libraryname.example; + +public class Class1 +{ + public void HelloFromCS() + { + System.Console.WriteLine("Hello Mom, from C#"); + } +} +``` + +## Build .NET: +And to do that we need first `cd` `.\src\libraryname.example\` and run: + +```sh +dotnet build +``` + +`Output:` +Build succeeded in 2.9s + + +## Create robot.toml: +Create a new toml file `robot.toml`. +```toml +extend-python-path = ["src/libraryname.example/bin/Debug/net8.0"] + +[env] +PYTHONNET_RUNTIME = "coreclr" +``` + +## Import dotnet to test.robot +Create a new `test.robot` file + +```Robotframework +*** Settings *** +Library DotNetLibraryBase libraryname.example.Class1, libraryname.example +##### DotNetLibraryBase [namespace].[classname], [Assemblyname] + +*** Test Cases *** + +New test + Hello From CS +``` + +`Output:` +Hello Mom, from C# + +## Reporting Issues + +If you encounter any bugs, have questions, or want to suggest improvements, please don't hesitate to open an [Issues](https://github.com/imbus/robotframework-dotnetlibrarybase/issues). Your feedback is valuable and helps make this project better for everyone. + +We appreciate your contribution to improving this project! From d9f7b0c8741c3fdbf5c13e8bd7e758872c2f1f50 Mon Sep 17 00:00:00 2001 From: "M.Kherki" <56655042+Alpha-Centauri-00@users.noreply.github.com> Date: Wed, 21 May 2025 09:41:04 +0200 Subject: [PATCH 2/3] Update README.md --- README.md | 124 +++++++++++++++++------------------------------------- 1 file changed, 38 insertions(+), 86 deletions(-) diff --git a/README.md b/README.md index 9dcca6d..01ed6be 100644 --- a/README.md +++ b/README.md @@ -1,92 +1,58 @@ -# robotframework-DotNetLibraryBase + + +# robotframework-DotNetLibraryBase.NET [![PyPI - Version](https://img.shields.io/pypi/v/robotframework-dotnetlibrarybase.svg)](https://pypi.org/project/robotframework-dotnetlibrarybase) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/robotframework-dotnetlibrarybase.svg)](https://pypi.org/project/robotframework-dotnetlibrarybase) +[![.NET 8](https://img.shields.io/badge/.NET-8-blueviolet?logo=dotnet&logoColor=white)](https://dotnet.microsoft.com/en-us/download/dotnet/8.0) [![License](https://img.shields.io/github/license/imbus/robotframework-dotnetlibrarybase.svg)](https://github.com/imbus/robotframework-dotnetlibrarybase/blob/main/LICENSE) [![Downloads](https://img.shields.io/pypi/dm/robotframework-dotnetlibrarybase.svg)](https://pypi.org/project/robotframework-dotnetlibrarybase) - # Introduction -Welcome to the documentation for `robotframework-DotNetLibraryBase`. This library allows you to integrate .NET functionalities into Robot Framework test suites. +`robotframework-DotNetLibraryBase` is a library designed to extend Robot Framework by enabling the use of custom C# functions as test keywords. It allows the creation of new C# classes, where multiple functions can be defined and then exposed as keywords for test automation within Robot Framework. This approach facilitates direct integration of .NET features into test suites, supporting a wide range of .NET functionalities with straightforward configuration and usage. -### Features +For a complete list of changes and releases history, refer to [Change Log](CHANGELOG.md). + +## Features - Seamless integration with .NET libraries. - Easy to use and configure. - Supports various .NET functionalities out-of-the-box. -### To get started, We need: - -
- .NET 8.0 - - 1. Go to [official .NET download page](https://dotnet.microsoft.com/download). - 2. Download the installer for your operating system. - 3. Run the installer and follow the instructions. - 4. Run `dotnet --version` -
- -
- Python - - 1. Go to [official Python page](https://www.python.org/). - 2. Download the installer for your operating system. - 3. Run the installer and follow the instructions. - 4. Run `python --version` - -
- -
- Visual Studio Code (VS Code) - - 1. Go to [official Visual Studio Code](https://code.visualstudio.com/download). -
- -
- RobotCode Extension +## Prerequisites - 1. Go to [official RobotCode](https://marketplace.visualstudio.com/items?itemName=d-biehl.robotcode). -
- -
- C# Extension (optional) - - 1. Go to [official Marketplace](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp). -
- -
- C# Dev Kit Extension (optional) - - 1. Go to [official Marketplace](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit). -
-
+- .NET [download page](https://dotnet.microsoft.com/download). +- Python [download page](https://www.python.org/). +- Required VS Code Extensions + - [RobotCode](https://marketplace.visualstudio.com/items?itemName=d-biehl.robotcode) + - [C# Extension](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp) (optional) + - [C# Dev Kit Extension](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit) (optional) # Installation Create a new virtual environment and activate it (recommended) -### Install dotnetlibrarybase +## Install dotnetlibrarybase ```console pip install robotframework-dotnetlibrarybase ``` - -
-.NET PART - - +# .NET Setup Guide ## Create a Solution ```sh dotnet new sln -o . -n libraryname ``` -`Output:` -The template "Solution File" was created successfully. +The template "Solution File" will be created successfully. -## Create .NET Project: +## Create .NET Project Create a new folder called `src` and navigate into it: ```sh @@ -94,23 +60,16 @@ mkdir src cd src dotnet new classlib -n libraryname.example ``` -`Output:` -Build succeeded in 0.5s -Restore succeeded. - -## Add Projects to solution: -`cd..` Back, to add new project to the solution. +## Add Projects to solution +Navigate back and add the new project to the solution: ```sh - dotnet sln add .\src\libraryname.example\ +dotnet sln add .\src\libraryname.example\ ``` -`Output:` -Project 'src\libraryname.example\libraryname.example.csproj' added to the solution. - -## Create C# function: -In `src` we have now `library.name`. lets add this function to `Class1.cs`. +## Create C# function +In `src/library.name/Class1.cs`, add this function: ```c# namespace libraryname.example; @@ -119,24 +78,21 @@ public class Class1 { public void HelloFromCS() { - System.Console.WriteLine("Hello Mom, from C#"); + System.Console.WriteLine("Hello Mars, from C#"); } } ``` -## Build .NET: -And to do that we need first `cd` `.\src\libraryname.example\` and run: +## Build .NET +Navigate to `.\src\libraryname.example\` and run: ```sh dotnet build ``` -`Output:` -Build succeeded in 2.9s +## Create robot.toml +Create a new `robot.toml` file with the following content: - -## Create robot.toml: -Create a new toml file `robot.toml`. ```toml extend-python-path = ["src/libraryname.example/bin/Debug/net8.0"] @@ -144,24 +100,20 @@ extend-python-path = ["src/libraryname.example/bin/Debug/net8.0"] PYTHONNET_RUNTIME = "coreclr" ``` -## Import dotnet to test.robot -Create a new `test.robot` file +## Create Robot Framework Test +Create a new `test.robot` file: -```Robotframework +```robotframework *** Settings *** Library DotNetLibraryBase libraryname.example.Class1, libraryname.example -##### DotNetLibraryBase [namespace].[classname], [Assemblyname] +#info DotNetLibraryBase [namespace].[classname], [Assemblyname] *** Test Cases *** - New test Hello From CS ``` -`Output:` -Hello Mom, from C# - -## Reporting Issues +# Reporting Issues If you encounter any bugs, have questions, or want to suggest improvements, please don't hesitate to open an [Issues](https://github.com/imbus/robotframework-dotnetlibrarybase/issues). Your feedback is valuable and helps make this project better for everyone. From 82a177d74f0abf6e074a1cd3c4f318061294ccae Mon Sep 17 00:00:00 2001 From: "M.Kherki" <56655042+Alpha-Centauri-00@users.noreply.github.com> Date: Wed, 21 May 2025 09:42:54 +0200 Subject: [PATCH 3/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 01ed6be..bbeb081 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ SPDX-FileCopyrightText: 2024 Daniel Biehl SPDX-License-Identifier: Apache-2.0 --> -# robotframework-DotNetLibraryBase.NET +# robotframework-DotNetLibraryBase [![PyPI - Version](https://img.shields.io/pypi/v/robotframework-dotnetlibrarybase.svg)](https://pypi.org/project/robotframework-dotnetlibrarybase) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/robotframework-dotnetlibrarybase.svg)](https://pypi.org/project/robotframework-dotnetlibrarybase)