hyperskill / hs-test

A framework that simplifies testing educational projects for Hyperskill. It is built on top of JUnit.
31 stars 10 forks source link

Creating Android Hyperskill Problems #134

Closed RedJocker closed 1 year ago

RedJocker commented 1 year ago

We have a new content creator that is responsible for creating content for composables and he is trying to create coding assignments using this document as reference, but he is not being able to do it

https://github.com/hyperskill/hs-test/wiki/Creating-Hyperskill-problems

we have never done something like this before and I'm not sure this is possible. We even opened a feature request on this card some time ago because we have been working with the premise that it is not possible to make coding assignments including android libraries, which is really bad for us.

Can you give us android specifics clarification on this matter? Is it possible to have coding assignments with android libraries using the steps provided on this document above?

aaaaaa2493 commented 1 year ago

@RedJocker Hi! Since hs-test cannot test Android solutions in general then it's impossible to create Android problems using hs-test.

However, text in the instruction is correct for Android problems as well, so they have to follow the same restrictions (no internet and no additional libraries) if you want the solutions to be testable in the web interface and you can use internet and libraries if you want the solution to be testable in IDE only.

At the moment we have no support for testing Android in the web interface (we have no environment being set up i.e. no Docker image). But you definitely can create Android problem that can be solvable in the IDE only. It should be possible right now without any additional support from Hyperskill.

RedJocker commented 1 year ago

For now creating Android problem that can be solvable in the IDE only would be a step forward, but @razoTRON is having problems trying to create one.

I have asked him to come here give the specifics, but there seems to be some errors doing the upload of the content to stepik and them settings.gradle and project level build.gradle end up not having the right version when trying to download it back from stepik

RazoTRON commented 1 year ago

@RedJocker Hi! Since hs-test cannot test Android solutions in general then it's impossible to create Android problems using hs-test.

However, text in the instruction is correct for Android problems as well, so they have to follow the same restrictions (no internet and no additional libraries) if you want the solutions to be testable in the web interface and you can use internet and libraries if you want the solution to be testable in IDE only.

At the moment we have no support for testing Android in the web interface (we have no environment being set up i.e. no Docker image). But you definitely can create Android problem that can be solvable in the IDE only. It should be possible right now without any additional support from Hyperskill.

@aaaaaa2493 Приветствую, Владимир! Столкнулся я с такой проблемой: копирую существующий проект по инструкции, вношу необходимые изменения, все работает отлично, тесты проходит. Загружаю обратно на степик как новый урок. После этого, если уже скопировать этот новый проект, загружается весь код, но build.gradle и settings.gradle имеют уже совершенно другое содержание! То есть совершенно не те, которые я загружал ранее. Соответственно, задание уже невозможно выполнить не изменив эти файлы. Стоит отметить, что при загрузке в студии выскакивает ошибка, что урок не загрузился, но он все равно появляется на степике. Проблема и в Android Studio, и в Intellij IDEA. Вот то, что я загружаю на степик: https://github.com/RazoTRON/cpu_profiling И вот то, что по факту туда загружается: https://stepik.org/invitation/e792fe19062f0855d2ad8c79188ce12113224268/

(Hello Vladimir! I ran into this problem: I copied an existing project according to the instructions, made the necessary changes, everything worked fine and passed the tests. Uploaded it to Stepik as a new lesson. After that, when I copy this new project, all the code is loaded, but build.gradle and settings.gradle have completely different content! That is, absolutely not the ones that I uploaded earlier. Accordingly, the task can no longer be completed without changing these files. It is worth noting that when I upload the lesson to Stepik in the studio, an error pops up: "the lesson isn't uploaded", but it's creating on Stepik anyway. The problem is in both Android Studio and Intellij IDEA.) Here is what I upload to Stepik: https://github.com/RazoTRON/cpu_profiling And here is what is actually loaded there: https://stepik.org/invitation/e792fe19062f0855d2ad8c79188ce12113224268/

aaaaaa2493 commented 1 year ago

@inuur Please check this

inuur commented 1 year ago

The issue doesn't relate to hs-test, and we will discuss in trello.